The approach is to emulate TeX as far as possible (in Perl), converting the TEX or (LATEX) document into LATExml’s XML format. That format is modelled on the typical document structure found in LATEX, and inspired by HTML, MathML, OpenMath and others. That abstract document is then further transformed into HTML of various flavors, with MathML and SVG, or into JATS or ePub or …. Of course, emulating TEX is kinda hard, there are many clever LATEX package developers, and the Web moves quickly, so there are gaps in fidelity and coverage. But for simple cases it might work just like this: latexml --dest=mydoc.xml mydoc latexmlpost --dest=somewhere/mydoc.html mydoc.xml