Ray's Scrivener Markdown Flow


Markdown is a text format that allows you to enter formatting information into a document using your keyboard instead of reaching for the mouse and selecting the text. For example in Markdown this "boldface text" looks like this:

**boldface** text

The text above can then be compiled into HTML, docx, rtf, PDF, or many other formats.

You can learn more about Markdown and its descendent MultiMarkdown from Fletcher Penney's cheatsheet

Markdown and Scrivener

This document shares how I work with Markdown inside of Scrivener. The goal is to use the best features of Markdown and Scrivener to get a smooth combined flow.

Scrivener supports Markdown in that it allows you to easily structure your document with chapters and sections while letting you to use Markdown (actually MultiMarkdown) to format your document.

Once you've written your sections using Markdown syntax, you compile the document for MultiMarkdown output by choosing the "Multimarkdown" option in the compile dialog box:

Compiling for MultiMarkdown

Scrivener does this compilation by rendering the structural contents in the binder as MultiMarkdown headers and subheaders Chapters become #Chapter and sections become ##Sections## based upon the folder's level in the document.


If you paste an image into Scrivener (as is done above) then the Multimarkdown compiler creates a directory that contains your Markdown document and the image. The Markdown document references the image in the folder and so you see it in any Markdown viewer.

You can add a caption to an image by putting the caption between square brackets [] on the next line.


Markdown lets you format text using characters in your document. There are many resources on the web for this. Here is Fletcher Penney's

Here are many of the formats in one sentence:

This is a lot of formats.

Which was created using:

<u>This</u> is a **lot** of *formats.*

Important: If you choose to work with Markdown, you must commit to using the Markdown syntax to impart format information. Scrivener format tools will not create format in the markdown output. This is actually a feature! The point of using Markdown is to be able to make text boldface while keeping one's hands firmly on the home keys on the keyboard.



Here are some random examples of Markdown including tables and code. This is really only here to provide an excuse for the section example.

for xx in [1,2,3]:



Ray's Markdown Flow

Markdown (and, of course it's descendent MultiMarkdown) is a fantastic tool for those of us who want to use formatting in our documents, but who hate reaching for the mouse. Also, Markdown documents can become anything we need: web pages, Word documents, or PDF (such as this one.)

Scrivener does an excellent job of translating structure and images into a Markdown document. I think it's best to use Scrivener for this function and to use other tools for downstream steps. My Scrivener/Markdown flow looks like this:

  1. Create a Scrivener project and structure the chapters and scenes as I like.
  2. Write your documents using Markdown syntax to impart format information.1
  3. Compile the project for MulitMarkdown, ignoring the options to create RTF or LaTeX directly from my project. See the image above.
  4. Use your favorite Markdown renderer to create the downstream formats you want.2

1 This footnote was created using Markdown format.
2 I like Marked 2 on the Mac. This footnote was created using Scrivener's Insert -> Footnote command. It creates the correct Markdown format.

Scrivener Example

You can download the project I used to create this example here.