MMD: No emdashes?

Dunno whether this should go to fletcher or keith, but exporting a draft to plain MMD strips out all emdashes. it just smooshes the words together, likeThis. Exporting to Latex, or HTML, or RTF keeps the emdash intact.

All that bit about converting hyphens and stuff is disabled, if yer interested.

It works fine for me, both as plain text MMD, as well as LaTeX.

What are you using for emdashes, “—”?

I’m using the emdash character, —, what you get when you type opt-shift-hyphen.

Never tried that with MMD. The proper way to do emdashes with MMD and Smarty Pants is — (hyphen x 3).

Uh oh! Looks like time for a global search and replace. What are two dashes, an en dash?

Is there any reason why, though? I know that Markdown reg’lar has no problem with emdashes. I just ask because, you know, it’s not like I’m using italics or anything. I’m confused that MMD just wouldn’t accept a normal character. What about extra-Latin stuff, like øs? I’ve already seen the Latex output choke hard on an s-with-comma. Seems to rather diminish its usefulness.

Amber, the whole em-versus-en syntax is all to do with which version of SmartyPants you’re using, I think, and what options you’ve turned on. My local SmartyPants script, as well as my Movable Type install, has always rendered “–” as an em-dash out of the box.

Further to my last post, I had a quick look in my “” file and found this:

# Configurable variables: my $smartypants_attr = "1"; # Blosxom and BBEdit users: change this to configure. # 1 => "--" for em-dashes; no en-dash support # 2 => "---" for em-dashes; "--" for en-dashes # 3 => "--" for em-dashes; "---" for en-dashes # See docs for more configuration options.

That’s true. I had all the SmartyPants scripts configured to render two hyphens as an en-dash and three hyphens as an em-dash. That’s easy to change, though. See jebni’s post above.

It’s actually not an MMD problem. Remember that if you export a plain text MMD file from Scrivener, MultiMarkdown is never used. Scrivener just exports a plain text file in MMD format.

So if a character is being stripped prior to MMD being called, it’s a Scrivener problem.

Just for fun, I ran the emdash character, as well as “—” through MMD using Textmate. The two of course looked different in XHTML, but when converted to LaTeX, the output was identical.

As for the other discussion, you’re right - technically SmartyPants is configurable. I recommend that — is an emdash and – is an endash, so that there is consistency between MMD files, but that is ultimately up to the user. The out-of-the-box SmartyPants settings for MMD will match that recommendation, but you are free to edit it.

cruxdestruct, this actually appears to be a bigger issue. “Smart” characters of various types (quotes, emdashes, etc) are not exported to the plain text file when MMD is used. If you skip plain text, and go straight to LaTeX, the characters are properly preserved.

This is an issue with Scrivener, and not MMD. But you are right, it is a bug, and should be fixable.

In the meantime, either export straight to LaTeX or another format, or use the plain text equivalent, and let SmaryPants turn the characters into the “smart” equivalent.

Thank you for pointing this out, and I apologize for missing your intended point and trying to steer you towards being forced to use the “dumb” equivalents. :slight_smile:

All is forgiven, dear friend. I knew I wasn’t CRAZY.