As the Wikipublisher architecture shows, the same wiki source produces Web and print output. The Wikipublisher typesetting engine uses the LATEX page composition system as an intermediate format. This has a number of advantages.
First, we translate wiki markup into Wikibook XML. Then we translate the XML into LATEX markup and on to PDF. XML to LATEX is an XSL transformation. The key component is the choice of a suitable DTD for the print channel.
The goal of the transformation to PDF is to produce excellent printed output, in a way that:
We could have chosen XSL-FO as an intermediate step in publishing the PDF. We chose LATEX because:
The audience for Wikipublisher is readers wishing to make careful off-line study of content from one or more Web pages. This means using the highest possible standards for typesetting. We must preserve all structural information, such as external links, in usable paper form.