Tips: Setting up Scrivener to Compile MultiMarkdown

Back in August I wrote a post about using Literature and Latte’sScrivener as a complete Blogging System“. What I wasn’t expecting was how that post drummed up a lot conversation about MultiMarkdown and writing in Markdown in general. After going back and forth with you all (a genuine pleasure), I realized that I hadn’t really covered the process of exporting your MMD documents from Scrivener into clean, valid html for whatever web-based platform you were using.

I thought I’d take care of that now and write a companion piece on both setting up Scrivener to use Fletcher Penney’s MultiMarkDown and, once installed, how to easily compile your documents and export them as clean html that you can then copy and paste into the WYSWYG of your preferred blogging platform.

First, let’s get MultiMarkdown installed (if you don’t have it installed already)…

Markdown Export

One thing I failed to mention in that original post was that you actually may not have MultiMarkdown installed on your computer. I say this, because I didn’t. The easiest way to tell (without using the command line)? Open Scrivener, click the Compile button and hit the drop down at the bottom. If you see just “MultiMarkdown” as an option and nothing else, you don’t have everything you need to compile your MMD document into html.

Here’s what you need to do (don’t worry, it’s easy I promise):

  1. Go to Fletcher Penney’s MultiMarkdown downloads page and grab the install that matches the OS you are using on the computer in front of you. I usually download to my desktop to find it easier.
  2. Unzip the file that downloads and double-click the installer within.
  3. Follow the onscreen directions to complete the install.

That’s it! Told you it was easy.

What now?

If you had Scrivener open prior to the download, save your project and quit. Now re-open Scrivener and you should now see a whole new host of MultiMarkdown options under the drop down at the bottom of the “Compile” menu!

mmdoptionsinscrivener

For most of you, the “MultiMarkdown -> Web Page (.html)” option is all you need. Click that and then click the “Compile” button. Again, I like to save the exported .html doc to my desktop to find it easily, but feel free save the document wherever you like and open it in a text editor. To do this, right-click your new .html file and choose an editor like Textmate, Coda or even good old Notepad. Once open, you’ll see that all of your MultiMarkdown has now changed from this:

mmdcode

To this:

ScrivMMDExport

The code you are interested in (unless your working with a static HTML-based site) is within the opening and closing body tags (<body></body>). Copy that code and post it into your site’s editor. When you do this, make sure you are in HTML mode in your site’s editor (in WordPress it’s under the “Text” tab), otherwise you’ll end up with a post contains all of your text as well as all of the html tags. Trust me, it looks funny and broken when you do it.

Hey, this is great! Thanks! But what’s the point to all of this?

Well, put simply, WYSIWYG editors have come a long way over the years, but they are still far from perfect.

If you’ve ever written a post, pasted it into the editor of your site and spent the next hour cleaning up code the editor thought you wanted, you probably wouldn’t want to write on your web site again for a while. On the flip side though, these same web site editors will just about always take clean and valid html code and render it correctly – displaying everything just as you’d expect. Still, trying to write in html (not to mention valid html) is a pain in the butt too – we shouldn’t have to frankly – and, luckily, with Markdown we don’t have to.

That’s why it’s so damn convenient that Scrivener supports it!

What this post didn’t cover. (aka: I smell a series comin’ on!)

I didn’t go over actually writing in Markdown.

I am assuming if you read this far, you already know how to write in Markdown (which lends easily into MultiMarkdown) and that wasn’t really the point of the this post anyways.

If there is interest, I’d be happy to write another post on how I write in, and rely intrinsically on, Markdown for all of my web publishing. If you’d like to hear more, leave any specifics in the comments below (even if it’s just a “Yes please!”) and I will do my best to accommodate them in a future post.

Hope you found this useful! Now get back to blogging in Scrivener!

Published by

Thaddeus Hunt

Writer, Dreamer, Web Designer, Gardner, Neo-Hippie, Horror Movie Junkie, Hiker, Traveler. This acct is not a reflection of anything (ie: my employer) except me.

28 thoughts on “Tips: Setting up Scrivener to Compile MultiMarkdown”

  1. thanks for this post. One silly question, since we installed multimarkdown, can we use all the syntax of multimarkdown (metadata, footnotes, tables) in scrivener

    1. Not a silly question at all. This is from the Fletcher Penney’s site:

      Using MultiMarkdown with Scrivener:

      Scrivener is a great program for writers using Mac OS X. It includes built in support for MultiMarkdown. If you want to use MultiMarkdown 3.0 with Scrivener, you need to install the Support files in ~/Library/Application Support/MultiMarkdown. The MultiMarkdown-Support installer is available from the downloads page and will install these files for you.

      This, to me anyways, says that Scrivener contains full support for it.

      Excellent question! Thanks for stopping by and I am glad you found the post useful!

      Best,

      Tad

  2. I guess my gripe with Scrivener & Markdown is why put Markdown in an RTF document that is later compiled into PDF. Down with RTF!

    1. Yeah, I’d always prefer straight up txt over RTF. Luckily RTF isn’t the only option. Exporting to MMD creates the aforementioned .txt file, html goes to html and flat xml to .fdot.

      But you’re right, MMD/MD to rtf is a wee bit of a head-scratcher. Though I am certain there are folks who appreciate it. Particularly those who write in MD to save having to click buttons in a toolbar.

    1. Excellent Maripat! We’ll see. There are a TON markdown tutorial sites out there so I don’t know really if I can add any more to that existing dialogue.

      At the very least I could curate a list of links to the ones I’ve gotten the most out of and share them.

      Either way thanks for coming by and I am glad you are getting something out of my posts!

      Cheers,

      Tad

  3. Nice job and much appreciated. I want to try this and build a work process for getting posts well written (with footnotes and references) to WordPress. I’d much appreciate more more more;-)

  4. “If there is interest, I’d be happy to write another post on how I write in, and rely intrinsically on, Markdown for all of my web publishing. If you’d like to hear more, leave any specifics in the comments below (even if it’s just a “Yes please!”) and I will do my best to accommodate them in a future post.”

    Tad, I would appreciate it if you would indeed write a post about the actual “How To” of writing in Scrivener using MMD. I have tried doing it a few times now and just cannot seem to get how to do it without seriously breaking a flow. Do you write first and then go back in and add MMD?

    I am used to thinking in HTML and have tried using the blockquote code above for where I quoted you. Not sure if that works in a comment. We’ll see and my apologies if it does not.

  5. Agree with Emerson. Your blog has helped me a bunch getting Scrivener set up. Would love to see the next in the series describing how you write in Scrivener using MMD and what the advantages are…

  6. Thank you for this great article. Everything is working fine with me. One thing to mention though it might not fit right in: I use Scrivener and MMD. Compiling from Scrivener to MMD -> HTML is working fine. However, I am often on the go and have no access to my Mac. Therefore I am syncing my Scrivener projects via external folder sync to my dropbox. Then I use a texteditor app on my iPad. The thing is: if I do not write footnotes and comments in MMD syntax but with the internal footnote and comments functionality of Scrivener (right pane) they are not synced. But using the internal function and compiling to MMD will work.
    I am still looking what I will do with that for I really want to use the Scrivener functionality of footnotes rather than to write footnotes in MMD-syntax. Any ideas?

    Cheers Marc

    1. Hey Marc,

      I ran into this myself and, after having a great conversation with a visitor to the site on Twitter, I found out that there is no real way (known anyways) to get Scrivener-created footnotes to export along with your MMD in the body. You have to include them in your MMD for them to export properly (as you discovered). I wish it were otherwise, but as far as I know there is no other way around that hurdle. I will certainly update this post if I find another way and please send it along if you do!

      Thanks for stopping by and for adding to the conversation!

      Best,

      Tad

    1. Hey Brent,

      To date it doesn’t. But, as I mentioned in my most recent post on this site, you can use a program called Marked that works great with Scrivener and any text editor you use it in conjunction with. Here is the link to that post. It is a Mac only option but it works great

      Best and thanks for stopping by,

      Tad

  7. I found your article and grateful I am. I just been stumped here for a few hours. I downloaded mmd via terminal and I have latest version installed. I even installed mmd support via .pkg . I’ve restarted my computer. Scrivener does not show the option once I compile or export. Any guidance?

    1. Hey Sergio! Sorry to hear about the difficulties of getting this installed. Did you follow the directions I had in the post? Mine didn’t necessitate using the command line. Also, do the MMD export options show up in a NEW .scriv project?

  8. Yes, please! My goal is organizing code with confidence that nothing will get lost or affect any other part of the file. Great article!

  9. Hi,

    following problem. I installed multimarkdown as you described. When I try to compile to MultiMarkdown –> html then nothing happens. The progress bar just does not finish and the file is not been created.

    Someone an idea?

    (Mac OS 10.11.2, Scrivener 2.7.1)

Leave a Reply