LaTeXML
LaTeXML copied to clipboard
Undefined `\topmargin`, `\textwidth`, `\textheight`, probably others
trafficstars
MWE:
\topmargin -1.5cm \textwidth 6in \textheight 8.5in
\documentclass{article}
\begin{document}
x
\end{document}
LaTeXML output:
<ERROR class="undefined">\topmargin</ERROR>
<para xml:id="p1">
<p>-1.5cm <ERROR class="undefined">\textwidth</ERROR>6in <ERROR class="undefined">\textheight</ERROR>8.5in
x</p>
</para>
Is it now common practice to use these before \documentclass? They'd be defined, but only courtesy of article loading and getting our LaTeX.pool support enabled.
Since latexml tries to emulate both plain TeX documents, as well as LaTeX documents, in a single executable, we hook ourselves at \documentclass as the trigger to provide the LaTeX-related definitions.
If you didn't need this support as the general default, you could force LaTeX support from outside via a preload directive, as in:
latexml --preload=LaTeX.pool [... rest of options ...]