TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've already Googled it, without concrete success. So, I'd like to know if someone knows a converter from XML to TeX. Something "simple" as latex2rtf.

share|improve this question
Could you elaborate whether you want to translate a specific XML-based document format (like FO or docbook) or general "xml data" to TeX. Maybe give an example of expected input/output? – Stephan Lehmke Jul 2 '12 at 7:06

XML is a file format not a language of any sort so asking for a general XML to latex is like asking for ASCII to latex. In general it depends what is in the XML file, one would not expect the same latex formatting for an XSLT program as a XHTML document, just because they both happened to use an XML syntax.

In general you need to specify the styling you want for the XML language in use. XSLT is perhaps the canonical tool for this, however it is possible to get TeX to read the XML directly and apply formatting from a stylesheet. xmltex does this for LaTeX and ConTeXt has similar facilities built in.

For example, one specific translation: If you want to translate mathematics encoded in XML as MathML to LaTeX markup you could use the pmml2tex XSLT translation available from http://code.google.com/p/web-xslt/source/browse/trunk/pmml2tex

share|improve this answer
\usepackage{smartass}: "XML is ... not a language of any sort": Isn't XML called "extensible markup language"? – topskip Jul 1 '12 at 14:41
True, but one man's metalanguage is another man's data: So yes it is a language of some sort but not in the same sense as LaTeX. – David Carlisle Jul 1 '12 at 20:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.