Wikipedia – DTP Used for PDF Export

exportpdftext formattingwikipedia

When viewing any Wikipedia article, it is possible to export the article to a number of formats, including PDF. My instinct told me they would use some TeX system (plainTeX, LaTeX, ConTeXt, etc.), but it doesn't quite fit the bill. The result looks 'nice'-ish, but nowhere near TeX's standards.

So, if not TeX, what does Wikipedia use?

Best Answer

If you're talking about Special:Book, then that comes from the Collection extension. That in turn uses several backends for generating the various formats. For PDF, the PDF Writer extension is used:

The PDF Writer uses the Python Reportlab libraries to generate PDF based on a DOM derived from parsing mediawiki-markup using the mwlib parser.