7 LaTeXML Output Quirks

LaTeXML is an excellent tool that is a key element in the workflow used to publish documents on this site. However, we have discovered a few “peculiarities” with the XHTML output that it produces. They are documented in this section. For the record, we are using the most recently published version (0.7.0) of this software.

7.1 Table Notes

Tables with footnotes are somewhat problematic when LaTeXML is used to generate XHTML code from a LaTeX document. More specifically, the table notes are left aligned on the page, while the table is centered on the page.

The best solution devised to date — given our limited interest in LaTeXML development and debugging — is to manually edit the LaTeXML generated documents and correct the XHTML markup directly. The technique involves including all the table notes in a multiline, single celled table that is displayed immediately after the main table. This degenerate table is centered on the page and the cell text is left aligned. It’s a kluge, but the two tables end up looking like a single, footnoted table when they are displayed in a browser.

The basic template is

</table>
<table align="center">
<td align="left" >
…
footnote markup
…
</td>
</table>

Each document that needs these contortions has a Manual Publication section in Scrivener’s research folder detailing its manual edit requirements.

7.2 Split Equations

We have been unable to make LaTeXML observe split commands, even though it includes support for the amsmath package.

7.3 Listings

LaTeXML’s support for the listings style (used to display algorithm’s on this site) is incomplete. For example, creation of arrays of emphasis lists/styles failed when the XHTML markup was generated by LaTeXML. That being said, if you live within its limitations, LaTeXML’s listings support is quite reliable.

7.4 Spacing Failures

LaTeXML code generated for equations containing text such as “where” and “and” clauses rarely observes the spacing that is present in the LaTeX generated PDF (e.g. <<<<x_i = j,“ where ” i >>) is often displayed as <<<<x_i = j,>>>>where<<<<i >> by LaTeXML. The only solution discovered to date is to manually edit the LaTeX documents and add extraneous spaces for use in XHTML generation by LaTeXML.

Each document that needs these contortions has a Manual Publication section in Scrivener’s research folder detailing its manual edit requirements.