Skip to content
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

optional argument in align breaks tagging structure #772

Open
u-fischer opened this issue Dec 10, 2024 · 1 comment
Open

optional argument in align breaks tagging structure #772

u-fischer opened this issue Dec 10, 2024 · 1 comment

Comments

@u-fischer
Copy link
Member

\DocumentMetadata{
 lang=en,
 testphase={phase-III,math,table,title}}

\documentclass{article}
\begin{document}
\begin{align*}
x& \begin{tabular}{c}
 $a$ 
\end{tabular} 
\\[2ex]
\end{align*}
\end{document}

gives a warning

Package tagpdf Warning: There are still open structures on the stack!
(tagpdf)                The stack contains
(tagpdf)                {Document}{Document},{Root}{StructTreeRoot}.
(tagpdf)                The structures are automatically closed,
(tagpdf)                but their nesting can be wrong.

The optional argument [2ex] triggers a subpart:

====>first-result=macro:->x& \begin {tabular}{c} $a$ \end {tabular} 
====>first-tmpmathcontent=macro:->[2ex]
====>formula has subparts
====>first-result=macro:->a
====>first-tmpmathcontent=macro:->
====>formula has no subparts

Without the optional argument the structure is correct. It is also correct if the inner tabular doesn't contain math.

@u-fischer
Copy link
Member Author

The error mainly affects pdflatex. And there are imho two general questions here:

  • should subpart processing (the splitting of formulas at the \\) be deactivated by default? We are not using it anymore if a mathml file exists or luamml is used, and the results are a bit dubious.
  • should there be further math grabbing inside the align? (the $a$ inside the tabular is marked as a Formula).

@FrankMittelbach any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant