tex2xml
tex2xml service
texformula2xml
KWARC group
LaTeXML
About
   
 

About

This service is being developed at the KWARC group. It uses the latexml converter which is being developed by Bruce Miller.

Interactive conversion

You can convert TeX or LaTeX files into xhtml either interactively or by batch conversion.

Batch conversion

To use the batch service, you need to upload either a single TeX file or a ZIP archive, which should also contain only one document, but may consist of multiple source files, including style files and images.
Using curl, one way to use this service would be
curl -F 'format=xhtml' -F 'upfile[0]=@zipfile.zip' 
           'http://tex2xml.kwarc.info/batchconvert.php' --output result.zip
If the ZIP archive contains multiple source files the converter will try to detect the main TeX file, which will not always work reliably. By setting the parameter mainfile to the name of the main file, you can specify the main file of your document.
The result will again be a ZIP archive, so a possible call looks like this:
curl -F 'format=xhtml' -F 'upfile[0]=@zipfile.zip' -F 'mainfile=main.tex' 
           'http://tex2xml.kwarc.info/batchconvert.php' --output result.zip

The answer of the server is also in ZIP format, therefore in this example the output is being written to a file named result.zip. The file extracts to a directory named tex2xml where you can find your uploaded files, the .xhtml result file and some additional logfiles.

There is a limit of simultaneous conversions. If this limit is reached, this service will respond with a 503 Retry after header, which will look like this:
503 Service unavailable
Retry-After: 120
Your software must pause the given number of seconds before trying to convert another file. Please be prepared for this status code, if you want to automatically convert files via a script.

Displaying MathML

Here is an example of an successful conversion of an article that has been published in 1999 (and has not been modified for this conversion).

Firefox

Firefox displays this file very nicely. You might need to install additional fonts, if you have problems displaying the equations or get warnings. Please visit the Fonts for MathML-enabled Mozilla page, and read the instruction in the right box of that page.

Internet Explorer

The Internet Explorer needs an additional plugin to be able to render MathML. You can find the MathPlayer plugin free of charge at Design Science.

Screenshots

In case of problems you can also take a look at some screenshots of the article above as it is rendered in my firefox browser. (Please click on image for full size.)

 

   

 

For further questions, do not hesitate to contact h.stamerjohanns jacobs-university.de.
 
  The service has been written by
Heinrich Stamerjohanns