Scrivener 3 is on the way…
View this topic | Back to topic list
Posted by Larry Kollar
Sep 27, 2017 at 03:39 AM
Dr Andus wrote:
>>I’ve built a pretty nice Scrivener workflow, based on MultiMarkdown
>
>Sounds interesting. Would you mind sharing your workflow with us?
Sure! I’m working on a formal series (with illustrations) at my writing blog, http://www.larrykollar.com/ —but I can give you the TL;DR version here.
I use Scrivener to structure the book, just like in a non-MMD workflow. But I use the MMD **bold** and *italic* constructs all the way through (and it looks like that won’t be a requirement for Scriv 3). For typewriter text (in fiction, I use it for text messages the characters send each other), I use American Typewriter and “Preserve Formatting”—character presets with that attribute get converted to backticks (`this is a text msg`) at Compile time.
Compile is where the magic happens. I make use of MMD’s transclude construct for section breaks, where {{file.html}} gets replaced with the contents of file.html. One of the neat things about this is, if you use * for the extension (like {{file.*}}), MMD uses file.html for HTML output, file.odt for ODT output, and so forth. For chapter breaks, I have Scrivener insert
(more about this later). I also have a front matter preset defined.
So, for eBooks, I compile to MMD using the front matter preset (basically “{{frontmatter.*}}” to insert a title page and copyright page). I use MMD to create an HTML file, load it to Sigil, remove the
tag because EPUBCHECK chokes on it, then hit F6 (split at markers). Boom, I have a formatted EPUB, and all I have to do is generate the TOC.
For printed books, I compile to MMD *without* the front matter preset. MMD creates an HTML file, then I use XSLT to transform it to either XSL:FO (formatting objects) or typesetter markup, and make a PDF. Both build the front matter and TOC for me. If I was made of money, I could use PrinceXML or Antenna House software to format the HTML and not have to maintain the scripts. :-P
That’s pretty much it. I have some technical chops, yeah, but I’ll say this: once you learn XSLT, you can do pretty much anything with a well-formed HTML file. XSL:FO is powerful, but it’s teeeeeeeeeedious.