AmerMathSoc / texml

A repository for texml development
9 stars 2 forks source link

inconsistent output for equation environment with respect to paragraphs #191

Open pkra opened 9 months ago

pkra commented 9 months ago

I noticed the following in one of our downstream tests

\begin{theorem}
  Some ref-range equations inside a theorem.
  \begin{equation}
    x \tag{1}\label{refrange:thm:1}
    \end{equation}
    \begin{equation}
    y \tag{2}\label{refrange:thm:2}
    \end{equation}
    \begin{equation}
    z \tag{3}\label{refrange:thm:3}
    \end{equation}
  \end{theorem}

comes out as

<statement content-type="theorem theorem" id="ltxid66" style="thmplain">
            <label>Theorem 10</label>
            <p content-type="noindent">Some ref-range equations inside a theorem.</p>
            <disp-formula content-type="math/tex">
              <tex-math>\begin{equation}
 x  <target id="texmlid17"><tag parens="yes">1</tag></target>
\end{equation}</tex-math>
            </disp-formula>
            <p>
              <disp-formula content-type="math/tex">
                <tex-math>\begin{equation}
 y  <target id="texmlid23"><tag parens="yes">2</tag></target>
\end{equation}</tex-math>
              </disp-formula>
            </p>
            <disp-formula content-type="math/tex">
              <tex-math>\begin{equation}
 z  <target id="texmlid18"><tag parens="yes">3</tag></target>
\end{equation}</tex-math>
            </disp-formula>
</statement>

Note how only the middle one is wrapped in a p tag.

pkra commented 1 week ago

Maybe related: #26