That would solve so many problems.

LaTeX is still unbeaten in terms of print quality. It’s really powerful. Since I’ve been using it, if started to really despise Writer and Impress. latex-beamer slides look just so much better than any PowerPoint presentation I’ve ever seen.

However, it’s far from easy to use. The syntax is a pain, and I don’t think it’s a feature that you can actuall program in this language. Similar things hold for BibTeX - there are so many things to do wrong there that will go a long way unnoticed.

I’ve recently helped a friend to fix some BibTeX files. It was a pain, there was so much wrong in there… for example URLs. People noticed that they can’t just always copy URLs in there, because some characters are special to LaTeX. But instead of using the \url macro, which would also have solved linewrap problem, they started doing the most obscure things (and of course they did not read the FAQ we wrote for them or asked how to do it right), for example adding whitespace to enforce line wraps, replace _ and & with whitespace etc., wrap uppercase chars in {} - an awful mess.

The same thing with the author values. They just wrote “First author, second author” without considering that this might be interpreted according to the common “Last Name, First Name” scheme: e.g. “van Damme, Jean-Claude”. (The correct syntax is “First Author and Second Author and Author, Third” - use “and” for separating even when you have more than two authors.)

XML is better here. It’s rules of escaping are generic and application-independant, and thus you’ll have much more tools that know how to do it right, and you only have to learn it once, not for each application. The structuring also comes in handy:

  <authors>
    <author firstname="Foo" lastname="Bar" />
    <author firstname="Gnarf" lastname="Quux" />
  </authors>

is a bit more to write, but it avoids parsing errors. And with good utilies it’s not particularly hard to write.

Now don’t point me to XML-FO. I know about formatting objects, the paper I submitted to the eXtreme Markup Languages conferences was done with FO. It’s just that they don’t come anywhere close to LaTeX in terms of print quality, the only OpenSource implementation I’m aware of didn’t make much progress (but they seem to have released a rewrite in the meantime) and was lacking important features, and MathML has a horrible syntax mess (apart from Apache FOP not having MathML support).

XSLT also has an annoying syntax. Too verbose and totally unreadable once you do things that are a bit more complex than the simplest examples.

I wish we had something that gives a similar print quality to LaTeX, that uses some XML format (or something similar structured and easy to parse, like Xcerpt data terms, but thats basically equivalent to XML, just a bit more compact; Lisp S-expressions and OEM are other examples) that allows the easy creation of third party utilities and does away with all the black magic involved…

Yeah, IMHO it’s really time for a rewrite of LaTeX with a modern language design. And a large, unified standard library; plain LaTeX sucks, you can barely use it without extras such as url, hyperref, latex-beamer.

[Update: yes, I’m aware of bibtexML, but it’s just as bad, you still need hacks such as “the {C} language” or using “and” to separate multiple authors. I’m also aware of docbook and docbook to latex converters; that definitely is a workaround, but doesn’t solve the real problems]

(Comments in my blog are intentionally disabled. So if you want to voice your general dislike of anything with XML, abuse your own blog!)