DocBook support?

I saw there was recent discussion about using DocBook as Scrivener’s internal format.
Rather than asking for that, I’d just like DocBook as an import/export format in Scrivener.

Possible? Impossible? Possible, but difficult?


Try searching Google for Scrivener and DocBook. An O’Reilly author built a workflow for this a while back, using the MultiMarkdown engine as a starting point. MMD is ideal for DocBook since it works by assigning semantic meaning to blocks of text, rather than pure formatting.

A native export might be something to pursue down the road, but before even thinking about that, we’d need some way of assigning “meaning” to blocks of text (outside of MMD, that is), and that is rather huge job all by itself. So yes at this point in time, “impossible” is the operative word, at least for the standard rich text usage of the software (where one presses Cmd-B/Ctrl-B to make something bold, and whatnot).

thanks for the reply.

i did some googling and came across asciidoc (
wondering where that would fit in the possible <=> impossible spectrum.



In theory, any plain-text structural format can be authored in Scrivener, and indeed one can just write directly in DocBook, LaTeX, XML or whatever they please. The compiler can be set to export a single plain-text document, and via Replacements as a way of making simple text macros and the ability to inject outline type and level based code into the output, you can do an awful lot without an excess amount of work. MMD’s special status is that you get automatic outline depth conversion to headers if you please, and a few of Scrivener’s formatting features (footnotes and images) can be converted to syntax for you. Finally the comprehensive compiler integration allows easy production of MMD documents without much work. But much of what the compiler does for MMD users can be built by hand using the compiler’s tools. You can even “hack” the MMD XSLT output to run your own arbitrary post-processing. If you install the MMD Mac support package into ~/Library/Application Support/MultiMarkdown, and then compile to MMD->LaTeX or HTML (it doesn’t matter), you can then go into the bin folder and find the script that gets triggered and cause that to do whatever—it doesn’t have to be MMD related at all. Use pandoc, asciidoc, post blog entries via Wordpress API—sky is the limit at that point because you’re operating on a STDIN stream at the UNIX level. Scrivener doesn’t care what you do with it.

Whew, that was a lot of jargon and tech talk, but if it made sense to you, then you’ve probably got quite a few ideas to go forward with.

Very cool.
I think I understand how it all works.
I’ll play around and see what I can figure out.