Compiling chapters to individual files

It basically boils down to this:

  • If you use Scrivener like a word processor, and compile out formatted documents using its built-in converters, like Kindle and PDF—then no. You’re going to have to figure out a way of doing that yourself after you compile. For PDF, there are good tools for that (including the Mac’s own free Preview.app). For Mobi, that’s going to be more awkward, you’d probably end up using something like Calibre in conjunction with a compile format Scrivener can produce that is easy to chop up. Ebooks on their own are not easy to chop up. So I would recommend maybe RTF for this. Calibre makes bulk conversion a snap once you get it set up, so there may be a little initial investment, but once you have things the way you want them, it should be fairly simple to pump out updates. The hardest part will probably be snipping the files up by hand in Preview/LibreOffice.

  • If on the other hand you use Scrivener as an authoring platform for some manner of plain-text markup, like Markdown, then the answer is yes. Because really at that point the answer is YES to just about anything you can imagine doing—because plain-text and Markdown files can be automatically post-processed using full programming languages and system tools. The compiler is, essentially, fully programmable.

    To that end, here is a file splitter example that I put together for someone. In this case the request to make multiple LaTeX documents bound together by a single index file at the top—but given how Markdown (and other markup languages) can be transformed into almost any kind of format you would ever need—including ebooks—it would be trivial to change this example project to make 33 .mobi files.

Now something worth considering is that with Scrivener you don’t have to start down the more flexible path with your writing methods, in order to tap into most of what it can do. In fact, I may not recall correctly, but I think that example project may have even presumed a rich text workflow at the top, being converted to Markdown and then from there into multiple LaTeX files. Even if not, it’s one single checkbox to try it out, and you may have to tweak less than you’d think in order to get it working well (a heavier reliance upon styles over ad hoc formatting, which is generally meaningless to semantic systems like Markdown, than you may be used to, for example).

1 Like