brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
857 stars 92 forks source link

`subfiles` package breaks `algorithm2e` #2323

Closed GregDMeyer closed 3 months ago

GregDMeyer commented 3 months ago

Thanks for the wonderful package!

I am observing the following issue. Take the following example:

\documentclass{article}

\usepackage{subfiles}
\usepackage[ruled]{algorithm2e}

\begin{document}

\begin{algorithm}
\nl Try to compile a \LaTeX{} document into HTML \;
\nl Have a mysterious issue \;
\While{cause is unclear}
{
    \nl Play around with the \TeX \;
    \nl Fiddle with the compiler \;
}
\nl Submit an issue to the LaTeXML project \;

\caption{How to get where I am today}

\end{algorithm}

\end{document}

Running pdflatex yields the following:

screenshot-2024-02-15-121301

Meanwhile, running latexmlc yields a broken algorithm. Line 3 is on the same line as the while statement:

screenshot-2024-02-15-121346

However commenting out \usepackage{subfiles} causes latexmlc to yield the correct output:

screenshot-2024-02-15-121219

Thanks in advance!