Preserving RTF formatting when exporting to MMD?

I’ve long been a user of MMD-like systems, mainly using Emacs plus some external formatter to get the output I want. Now that I’m looking at Scrivener, it feels like a far better home for just purely writing than anything I’ve used until now.

And yet, while I love the flexibility of MMD as an intermediate format, my human eyes just prefer to see real italics when I want to emphasize something, rather than italics.

Is there any way to have Scrivener convert RTF italics to italics when it outputs via MMD? There are also a few others RTF conventions I’d like to see carried over:

  1. Turn emdashes (—) into —.
  2. Soft returns become space-space-return.
  3. Hard returns become paragraph ends.
  4. Italics, bold, etc., are rendered in the appropriate markup.

I’m not sure whether this requires writing a full blown RTF parser or net, but it would make Scrivener that much better for me. At the moment I sort of get this using a minor-mode in Emacs that renders this as visual italics. But I still have to “this” – whereas I would much prefer to type M-i this M-i. It just seems more natural.


You are in luck with simple bold and italic formatting. While Scrivener will not automatically convert these visual formats into MMD during export, you can still tell Scrivener to convert them manually. If you’d rather not look at them, this would be something you would want to do near the end of your workflow. The command is in Text/Convert/Bold and Italics to MultiMarkdown Syntax.

Be aware that in some complex formatting situations, things will not work as expected. Most notably, format inside of words will not work in MMD due to technical limitations. Another common error is to accidentally apply bold or italics to the white-space around words. In RTF, this really doesn’t matter a whole lot, but in MMD, it looks a little weird, and can lead to unexpected results. Also, during my testing I ran into a few complex situations where things got de-synchronised. This seemed to happen in an italic passage that had alternating italics and bold sections within it. Probably something that will never come up in normal writing. The reason Scrivener does not do automatic conversion is because of these quirks. Making it a manual process allows you to go through and review the syntax to make sure everything is okay.

Emdashes, “typographic” quotations, and such will in fact get converted upon export. If you use triple-hyphens to denote them, and all standard straight quotes will get converted to proper start/end quotes. The script that does this is pretty intelligent, I have never seen it mess up. I personally recommend turning off Scrivener’s automatic typographic conversion features when using MMD, but as far as I know, that is just a matter of taste. I prefer a more portable end result.

Paragraphs, that is just going to have to be MMD standard. If you need a list type return, or verse, put two spaces on the end of the preceding line. Otherwise, a double space between paragraphs is required. I doubt this will ever change. Scrivener’s support of MMD is mostly via its export capability. It doesn’t do a whole lot internally, and that will probably not change in the near future, either.

Amber has already answered this one, but just to add that there is no way I am writing a full blown RTF parser. The MMD support is very basic, and is not a major feature of Scrivener; MMD users are expected to use MMD format, though there is basic support for converting italics and bold on a per-document basis via Text > Convert… I did experiment with building this into the exporter, but there are too many potential problems given that MMD does not support bold and italic in the same way as RTF - there is less flexibility with such formatting in MMD. Thus, the user could potentially end up with a file with lots of errors in it caused by incorrect bold/italic parsing. By placing this feature in the Text menu, it forces the user to address any such issues prior to export.
All the best,