Some XHTML documents, especially those produced with GLOSS can be converted to LaTeX for processing with latex, pdflatex, etc.
There are a number of difficulties with conversions between (La)TeX and XML. Certainly, these formats differ considerably in their expressive powers, with HTML, MathML and other XML formats usually providing more mark-up than (La)TeX, limiting the possibility of TeX-to-XHTMLplusMathML conversions. But perhaps the major difference is the fonts: traditional TeX uses fonts with non-standard code points (even having some code-points shared between several characters depending on TeX's mode: maths, verbatim, text, etc) whereas XML uses unicode throughout. This limits XML-to-TeX conversions, as unicode fonts and all the required characters are not available in TeX.
Some progress was made in the TeX world on this issue in the past, implementing (part of) UTF-8 in TeX, but recently this effort has stalled in a somewhat incomplete state. The UCS TeX package is probably the most complete, but it has several issues. Extensions of TeX, such as Omega and Lambda are another way to go. GLOSS's XML-to-TeX conversions rely on UCS and other packages, and do not always work for all inputs.
From the command-line, just type gloss-xhtml2tex FILE.xhtml to convert FILE.xhtml to FILE.tex. This also copies style files xhtml2tex.sty and x2tconfig.sty to the current directory. xhtml2tex.sty is the main style file; x2tconfig.sty is a secondary one intended for for any additional local modifications that may be required.
Further details, examples, and technical information is available in the xslt/xhtml2tex section of this documentation.
This page is copyright. Web page design and creation by GLOSS.