To reiterate: This technique requires no knowledge of MMD. You will not have to install anything (Scrivener has a version of MMD built right in). All we will be doing is using its inherit ability to create a nice list of headers for our own purposes. I am going to be putting this tip in the next version of the FAQ, in the advanced section, but here it is now:
If the tip in the Input/Output section above does not produce an outline that you can use, you might be able to use MultiMarkdown to create a much more flexible outline. MultiMarkdown syntax in the rest of your document is not a requirement, as we will only be working with titles (and optionally synopsis). The one drawback to this method is that while it creates a nice print outline in a browser, since the titles are not actually indented, this cannot be used to import into a proper outliner which parses indented lines.
First, we need to add a Cascading Style Sheet (CSS) to your Scrivener project’s export engine. Go to the File menu, and choose MultiMarkdown Settings. You will see a list on the left, and large text area beside it. Click the ‘+’ button below the list, and type in ‘XHTML Header’, without the quotes. It is important to capitalise everything correctly. In the large text area, copy and paste this block of style information:
<style type="text/css" media="all">body { counter-reset: part; font-family: Georgia,'Times New Roman', serif; } h1 { counter-reset: chapter; } h1, h2, h3, h4, h5, h6 { font-size: 1em; font-weight: normal; margin: 0; line-height: 1.4em; } h1 { margin-top: .5em; } h1:before { content: counter(part, upper-roman)'. '; counter-increment: part; } h2 { margin-left: 3em; } h2:before { content: counter(chapter)') '; counter-increment: chapter; } h3 { margin-left: 6em; } h4 { margin-left: 9em; } h5 { margin-left: 12em; } h6 { margin-left: 15em; } h3:before, h4:before, h5:before, h6:before { content:'* '; } p { margin-left: 300px; margin-top: 0; margin-bottom: 0; width: 300px; font-size: .8em; } p strong { visibility: collapse; } </style>
Important: Make sure there are no empty lines in this box. It should all be on one line. Click ‘Ok’ to dismiss this dialogue box, and proceed to Export Draft. You will use the same settings as described earlier, when using the standard RTF exporter. The provided stylesheet will accommodate the inclusion of synopsis, if you prefer, but does not require it. For the actual export format, make sure you choose ‘MultiMarkdown -> HTML’.
Also note that this particular stylesheet will automatically number the first two header depths. So, if you use the classic Book/Part/Chapter/Section structure, it will number the Parts with Roman Numerals, and the Chapters with numbers. The Chapter numbers will not reset between parts. Anything below the chapter level simply gets an asterisks in front of it. If you do not want automatic numbering, use the following stylesheet instead. This will simply print titles verbatim, and indent them according to depth:
<style type="text/css" media="all">body { font-family: Georgia,'Times New Roman', serif; } h1, h2, h3, h4, h5, h6 { font-size: 1em; font-weight: normal; margin: 0; line-height: 1.4em; } h1 { margin-top: .5em; } h2 { margin-left: 3em; } h3 { margin-left: 6em; } h4 { margin-left: 9em; } h5 { margin-left: 12em; } h6 { margin-left: 15em; } p { margin-left: 300px; margin-top: 0; margin-bottom: 0; width: 300px; font-size: .8em; } p strong { visibility: collapse; }</style>
Also note that counter numbering is a CSS feature that is not completely supported by all browsers. You may need to upgrade your browser to the most recent version. I have tested this stylesheet in Firefox 2, and Safari 3. If numbering does not work for you, and you do not want to upgrade or change browsers, you might want to use the simplified stylesheet above.
Why use this method, when Scrivener has an HTML exporter that doesn’t use the MultiMarkdown engine? The HTML exporter is provided by Apple, and does not actually inject any semantics into the HTML. It makes every attempt to copy the appearance of the RTF version. Thus, titles will not be contained in HTML header elements, but rather in styled blocks with increased font sizes and such. As such, this is perfectly useless when used in conjunction with a stylesheet.
Addenda: It seems there is a bug in some recent versions of the MMD package, in the script that is responsible for converting quotes to typographic quotes. If exporting from Scrivener produces an HTML document that doesn’t indent, or has messed up numbering, that is probably what is going on. There is a relatively simple fix, but one could just wait until the next update. This bug may not show up if you are using the non-beta version of Scrivener. I haven’t verified that though.