New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Padding in aligned environment not correct after fourth column #968

Closed
siegfriedzoetzsche opened this Issue Apr 11, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@siegfriedzoetzsche

siegfriedzoetzsche commented Apr 11, 2018

Consider a latex file aligned.tex:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  \begin{aligned}
    a & = b & c & = d & e & = f \\
  \end{aligned}
\end{equation}
\end{document}

with six columns representing three separate equations on the same line.

When running latexml (LaTeXML version 0.8.2; revision 48de2c4) with

latexml --strict --verbose --nocomments --destination=aligned-latexml.xml aligned.tex

a padding is added to the every third column ('c' and '= f' in the example):

aligned-latexml.xml:

[...]
<MathFork>
  <Math tex="\displaystyle\hskip 10.0ptc=d" text="c = d" xml:id="S0.E1X.m4">
    <XMath>
      <XMApp>
        <XMTok meaning="equals" role="RELOP">=</XMTok>
        <XMTok font="italic" lpadding="10.0pt" role="UNKNOWN">c</XMTok>
        <XMTok font="italic" role="UNKNOWN">d</XMTok>
      </XMApp>
    </XMath>
  </Math>
  <MathBranch>
    <td align="left"><Math tex="\displaystyle\hskip 10.0ptc" text="c" xml:id="S0.E1X.m5">
        <XMath>
          <XMTok font="italic" lpadding="10.0pt" role="UNKNOWN">c</XMTok>
        </XMath>
      </Math></td>
    <td align="right"><Math tex="\displaystyle=d" text="absent = d" xml:id="S0.E1X.m6">
        <XMath>
          <XMApp>
            <XMTok meaning="equals" role="RELOP">=</XMTok>
            <XMTok meaning="absent"/>
            <XMTok font="italic" role="UNKNOWN">d</XMTok>
          </XMApp>
        </XMath>
      </Math></td>
  </MathBranch>
</MathFork>
<MathFork>
  <Math tex="\displaystyle e\hskip 10.0pt=f" xml:id="S0.E1X.m7">
    <XMath>
      <XMTok font="italic" role="UNKNOWN">e</XMTok>
      <XMTok font="italic" name="quad" role="PUNCT"> </XMTok>
      <XMTok meaning="equals" role="RELOP">=</XMTok>
      <XMTok font="italic" role="UNKNOWN">f</XMTok>
    </XMath>
  </Math>
  <MathBranch>
    <td align="left"><Math tex="\displaystyle e" text="e" xml:id="S0.E1X.m8">
        <XMath>
          <XMTok font="italic" role="UNKNOWN">e</XMTok>
        </XMath>
      </Math></td>
    <td align="left"><Math tex="\displaystyle\hskip 10.0pt=f" text="absent = f" xml:id="S0.E1X.m9">
        <XMath>
          <XMApp>
            <XMTok lpadding="10.0pt" meaning="equals" role="RELOP">=</XMTok>
            <XMTok meaning="absent"/>
            <XMTok font="italic" role="UNKNOWN">f</XMTok>
          </XMApp>
        </XMath>
      </Math></td>
  </MathBranch>
</MathFork>
[...]

The expected behavior would be to add a padding to every odd column except the first.

@dginev dginev added this to the LaTeXML-0.8.4 milestone Apr 11, 2018

@brucemiller

This comment has been minimized.

Owner

brucemiller commented Apr 23, 2018

Harumph; a cut-n-paste error, I think. I must have copied the column pattern from eqnarray? Anyway, fixed now in the repo; thanks for the report!

@dginev dginev modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 Apr 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment