TeXML: an XML vocabulary for TeX
11:10, 13 Apr 2004 UTC | Oleg Paraschenko

TeXML is an XML vocabulary for TeX. The processor transforms TeXML markup into the TeX markup, escaping special and out-of-encoding characters. Intended audience is developers who convert documents from XML to TeX.

Example of TeXML to TeX translation
<cmd name="documentclass">

One of the main benefits of TeXML usage is automatic translation of the TeX special symbols.

Example of translation of special TeX symbols

The TeXML processor supports different output encodings and escapes out-of-encoding chars automatically.

Example of translation of non-ASCII characters
TeX in ASCII encoding
\cyrchar\CYRT \cyrchar\cyre \cyrchar\CYRH 
TeX in Russian encoding

Rationalities and objectives of TeXML were presented by Douglas Lovell at the Tex Users Group meeting in 1999. His paper is available online on the TUG site: "TeXML: Typesetting XML with TeX" (PDF, 180 Kb). He also wrote TeXMLatte, a Java implementation of TeXML by IBM alphaWorks, but now his realization "has been retired".

The new TeXML processor is written in Python and is published under GPL. Software can be downloaded from the SourceForge project files area.

Re: TeXML: an XML vocabulary for TeX (olpa - 02:49, 22 Apr 2004)

Paul, thank you very much for support and comments! I plan to answer you in private.

Re: TeXML: an XML vocabulary for TeX (Paul Tchistopolskii - 19:56, 21 Apr 2004)

Oleg, great project. It has two sides in it.

1. TeXML vocabulary is a nice scientific exercise (few things can be done better, though, like better balancing between 'attributes' and 'elements', but not let us go there because TeXML is not that important in my eyes)

2. Re-writing PassiveTex in Python (or Perl, or whatever other scripting language) is right on the money. Please let me know when / if you complete it to the point of, say, PassiveTex. I may have some business proposition for you.

It is nice to see when common sense strikes back, even when it takes a couple years for that to happen.

By the way, you are wrong when you defend your position on a grounds that it is interesting only to 1% of the users, assuming that the rest 99% are happy with XEP and/or FOP.

My advice - ignore all the critics and pull PassiveTex re-implementation as far as you can.

It will find it's market no matter how long it will take you to do that. You may be surprised with the results of your jorney, actually.

Rock on!


ex-Co-founder (they've removed me from the website recently ;-) and ex-CTO of RenderX (makers of XEP).

Re: TeXML: an XML vocabulary for TeX (olpa - 11:04, 16 Apr 2004)

Hi Maarten, you wrote: "Since one can generate plain TeX code directly with XSL...". But the main point is: indeed one _can't_ do it (at least, without awful string processing).

Please look at discussion of TeXML in comp.text.tex:

For example, Torsten Bronger, author (or contributor) of tbook and db2latex projects (so he knows very good about XML->[La]TeX translation), writes:


> Why not just code the content generically and purely semantically > and then use XSLT magic to get whatever TeX output you want?

Because XSLT cannot do all for you. You have to use XSLT's "text" output format which is totally arbitrary. XSLT processors guarantee to produce well-formed XML and well-formed HTML, but the text output is uncontrolled.

TeXML tries to make at least some syntax errors (in the sense of TeX) impossible. And most of all: XSLT cannot create TeX counterparts of Unicode characters efficiently, neither does it proper escaping of special TeX characters.



On XSL-FO and its processors: they are good for 99% of users. But I'm from a 1% of those who need something other.

Re: TeXML: an XML vocabulary for TeX (Maarten Wijnen - 06:17, 16 Apr 2004)

I fail to see the importance of this new XML-dialect. Maybe I'm wrong, if so, please enlighten me. As another reader pointed out, TeXML is just a XML syntax for the TeX semantics and therefore adds no new real functionality. Since one can generate plain TeX code directly with XSL I also fail to see how TeXML will bridge a gap between XML en Tex, unless one wanted to perform transformations on the TeXML output itself.

The article from 1999 mentions that XSL-FO lacked real implementations at that time and TeXML could serve as an alternative. Today however workable implementations of XSL-FO exist, both as proprietary (XEP) and free software (FOP). The notion that the TeX-engine is stable and mature and could be used as a more general rendering engine in the field of XML is still quite true I guess. But this doesn't mean that the XSL-FO is an obsolete W3C standard.

PassiveTeX is Tex-based and takes another approach to the same problem TeXML addresses. PassiveTeX uses XSL-FO as input and renders the content to for instance PDF with the use of TeX. This has the advantage of using the same excellent rendering engine while adhering to a W3C-standard with increasing importance, keeping your transformation process compatible with the industry.

I don't know the actual state of PassiveTex from own experience but judging by the overview on the site ( it seems to be quite usefull.

Re: TeXML: an XML vocabulary for TeX (olpa - 13:18, 15 Apr 2004)

TeXML does not add anything to TeX or FO. TeXML is just an essential tool for converting XML to TeX using XSLT.

Re: TeXML: an XML vocabulary for TeX (bryan - 12:46, 15 Apr 2004)

so how does the control offered by this implementation compare to the control offered by xsl-fo?

does it support all possible Tex constructs or are there limitations?

> Re: TeXML: an XML vocabulary for TeX (bryan - 12:48, 15 Apr 2004)

Re: TeXML: an XML vocabulary for TeX (Stephen Miller - 10:35, 14 Apr 2004)

Looks like LaTeX to me...

xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories