brucemiller / LaTeXML

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

subequation reference (again) #2432

Open HansOlsson opened 1 month ago

HansOlsson commented 1 month ago

The following code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
System \eqref{eq:1}
Equations \eqref{eq:1a} and \eqref{eq:1b}
\begin{subequations}
\label{eq:1}
\begin{equation}
\label{eq:1a}
a = b +c
\end{equation}
\begin{equation}
g = h + i
\label{eq:1b}
\end{equation}
\end{subequations}

System \eqref{eqq:1}
Equations \eqref{eqq:1a} and \eqref{eqq:1b}
\begin{subequations}
\begin{equation}
\label{eqq:1a}
a = b +c
\end{equation}
\begin{equation}
g = h + i
\label{eqq:1b}
\end{equation}
\label{eqq:1}
\end{subequations}
\end{document}

Generates

System (1) Equations (1a) and (1b)
...
System (2b) Equations (2a) and (2b)
...

Note that the 2nd system says 2b - not 2 as intended, and that it seems to work for nested align; and it also works if the labels are before the equations as in System 1 (which provides a handy work-around).

I have not tested in the most recent version, but I could not find a matching issue.

dginev commented 1 month ago

Thank you for the report. I have reproduced it with the latest latexml, screenshot attached:

image