Is there some typesetting system that uses XML for notation? This is no offense, but I don't like to type \emph{This \emph{text} is important} despite the fact that there are editors that can do it for you. (Though I think the real hardcore LaTeXers don't use them.)

I would rather want to do something like the following, because it's more easy to type in my opinion and my keyboard layout:

<em>This <em>text</em> is important</em>

Although there are a lot of XML-parsers out there and the style of XML is simpler, clearer and common to me. But I don't think that HTML fits my needs as it is a hypertext- and not a document markup language.

Additional question: Can you please list me some drawbacks when using HTML instead of LaTeX-like typesetting systems when writing huge documentation?

  • 1
  • 3
    Could you maybe clarify your question? The kinds of arguments for generalised markup languages are generally based on the relative ease of translation into a variety of different formats. But you seem to be worried just about typing the input. Is there some reason why you would prefer to type XML than LaTeX markup if, e.g. you only need to produce PDF?
    – Alan Munn
    Feb 16, 2011 at 23:35

6 Answers 6


DocBook is certainly the standard for XML documentation writing. I've heard of DITA, but couldn't tell you much about it.

You can use ConTeXt to process XML. It works by defining a mapping between the XML tags and TeX markup instructions. This should give you the benefits of DocBook (universal, XML-based) and many of the benefits of ConTeXt in the document beauty and ease of formatting department.

While there are many differences between TeX and HTML of particular interest to typographers, in my opinion the greatest strength of using a system like TeX, LaTeX or ConTeXt is that, by virtue of being programmable, you can extend what it does. I would hate to maintain an index by hand, for example, or have to remember all the finicky details about how to format citations. All TeX variants can do these kinds of tasks for you and more, and by being TeX they expose a way for you to extend this to whatever your unique problems are. Customizing DocBook rendering through XSLT is quite a chore. You'll have to learn XSLT, XPath, XSL:fo, and find yourself a quality FO processor. Last time I was looking into this, the open source FO processor wasn't very good and a commercial one wasn't cheap. (Of course, generating HTML output only, you could remove that dependency.)

HTML is not programmable like TeX at all. You can certainly find packages that take TeX or other types of markup and produce HTML, you won't be able to find many systems that start with HTML and produce other things. HTML is burdensome to manage by hand, especially if you want to maintain similar structure across a set of pages. There are many things CSS simply cannot do. There's also a 1:1 mapping between an HTML document and an HTML page, unlike TeX, where these concepts are not linked.

The competing system I've heard the most about lately is Sphinx, which would probably be more appropriate for documenting programming projects with a primary emphasis on HTML output.


ConTeXt can directly process XML.

See Thomas's MyWay and the official documentation


There is the DocBook XML format which you can use for books or other form of documentation. There is for example Apache FOP which can compile it to PDF. The advantage is that it can be converted to other formats like HTML much more easily than LaTeX. I know it from the Subversion book which is written in DocBook XML because the publisher O'Reilly Media wants it this way, to make print and online (PDF, HTML) copies from it.

The drawback is that you do not have the typesetting power of TeX, i.e. the generated PDF are rather ugly. There are however DocBookXML to LaTeX converters which can produce LaTeX from it first. The last time I tried it the produces code wasn't breath-taking either.

  • okay, but the subversion pdf really doesn't blow anyone away. It is good piece of documentation just not great layouting. Aug 1, 2016 at 13:09
  • @LoSauer: I agree. The problem is that the PDF is produced from a Apache XML PDF tool. It should be converted from DocBook to LaTeX and then produced by pdfLaTeX instead. Aug 4, 2016 at 17:40

The U.S. Congress uses an XML format for creating legislative documents. Here are some examples from the 108th Congress. I personally prefer typing \author{name} to typing <author>name</author>, but that distinction can easily be remedied by using a better editor.


"Typesetting" is a term I haven't heard for a while - which is why google might not be your friend on this one! There are a number of XML vocabularies designed for authoring documents (some of the popular ones are DocBook for software documentation, NLM for scientific/academic papers, DITA for pretty well anything else) and they all come with tools for producing output in various forms. Closer to the print technology there is XSL-FO (formatting objects) which is an XML-based page layout vocabulary: you wouldn't use it directly for authoring, but rather as an intermediate format between the author's view and the final ink-on-paper.

  • 1
    Welcome to the TeX StackExchange Michael Kay! I've read some of your XML/XSLT books and learned a lot. But here we do use "typesetting" to describe the process of creating electronic documents as well as paper ones. See the about page. Feb 17, 2011 at 13:10

It sounds like you‘re asking for a program that can turn XML into something nice, rather than asking about XML schemas? If so, Arbortext Print Publisher (formerly 3B2) does the job very well, albeit with a horrible user interface.

InDesign can also import XML, but it’s hopeless at anything too complex.

You must log in to answer this question.