Don Marti

Wed 04 Feb 2009 09:08:43 AM PST

Books in LaTeX

Jono Bacon posted a piece on using version 3.0 to write and edit a book.

I’m at No Starch Press, and one of our options is for authors to use LaTeX (in a git repository, so everyone has a a copy of everything, just in case). LaTeX is a solid option for a book that’s heavy on the sample code, because if the author has a script to parse out and test the code, that script will still run even after the book has been through initial edit, tech review, copy edit, and final layout.

If you parse out the XML from a current word processor, you can extract and run the sample code from the word processor document, but the word processor document isn’t the source of the final pages that go to the printer. The files that go to the printer comes from the DTP application, and additional corrections get applied at that stage.

When you do the word processor workflow, the final "source" behind the document sent to the printer ends up being the native format of one of the Adobe applications or something like that. As far as I know, you can’t type a single "make" that both builds the PostScript or PDF pages and also tests the code in the book. And of course you’re not running Free Software all the way through the pipe, if that matters.