Post by David T. Ashley
I'm working on a technical book (table of contents, equations,
tables, cross-references, index, etc.), and I'd like to produce all
a)LaTeX source code.
b)HTML output (so the book can be viewed in a browser as a set of web pages).
c)E-reader source code or output (this is a complex topic, because
other tools are involved, and there is more than one way to do it).
Has anyone developed any tools that go in this direction? I can
develop my own tools, but I would like to see what exists already
Yes, there are extensive toolchains available. IMNSHO BY FAR the most
reliable is to author the document in XML, using (for example) the
DocBook schema, because you can generate everything else from that,
using transformations written in XSLT2. There is a fully-worked (but
very simple) example of XML-to-LaTeX towards the end of _Formatting
I've written four books, dozens of articles, all my documentation, and
several web sites in XML this way, and generated LaTeX to get PDF, HTML
for the web, and EPUB3 to get an ebook. There will be screams from the
gallery that XML is "too hard" but it's not: it's actually simpler than
LaTeX, just different.
The only problem is that XML editors are mostly not aimed at WRITING, so
they lack many of the features and facilities that you expect from a
writing tool like a wordprocessor. They are improving, slooooooowly, but
it's still an effort, which is a pity: it could easily be so much simpler.
But I consider that a very small penalty for the ability to maintain a
single source document from which I can produce lots of different
formats. You also need to take into account that I'm heavily biased:
I've been doing this for decades, so it's second-nature. I'm also a
dyed-in-the-wool Emacs user, so all the tools I need are immediately
available either within Emacs or one click away. Everything else (DTD,
RNG, XSLT2, LaTeX, epubcheck, browsers, XML tools) is available for
There is a learning curve but it's well documented and there is plenty
of help online. <plug class="shameless">There is also the XML Summer
School in Oxford in mid-September where you can meet people who do this
stuff, including me. http://xmlsummerschool.com/</plug>
Formatting Information: http://latex.silmaril.ie/
XML FAQ: http://xml.silmaril.ie/