latex3 / tagging-project

Issues related to the tagging project
https://latex3.github.io/tagging-project/
LaTeX Project Public License v1.3c
23 stars 5 forks source link

footnotes ending with \par produce wrong tagging with pdflatex after \@finalstrut change #81

Closed u-fischer closed 2 weeks ago

u-fischer commented 4 weeks ago

In LaTeX 2024-06-01 the definition of \@finalstrut has changed and this here

\DocumentMetadata{testphase=phase-III,uncompress}
\documentclass{article}

\begin{document}
text\footnote{blub\par}
\end{document}

gives a nested mc warning

Package tagpdf Warning: there is no mc to end at 7
Package tagpdf Warning: nested marked content found - mcid 8

and the PDF stream contains a stay EMC

/text <</MCID 7 >> BDC
BT
/F39 7.9701 Tf 151.701 641.604 Td [(blub)]TJ
ET
EMC
EMC

This can be fixed by adapting the \@finalstruct definition as shown in https://github.com/latex3/latex2e/issues/1372#issuecomment-2155424372

\makeatletter
\def\@finalstrut#1{%
  \unskip
  \ifhmode \nobreak 
  \else
    \ifdim \prevdepth=-\@m\p@
    \else
      \vskip-\prevdepth
    \fi   
\vskip-\baselineskip  %new
  \fi
  \vrule %new
  \@width\z@\@height\z@\@depth\dp#1}
\makeatother
FrankMittelbach commented 4 weeks ago

bug in LaTeX, that will be addressed in a hotfix, thus a very tempory problem hopefully

u-fischer commented 4 weeks ago

yes I know, I only wanted a record ;-)

FrankMittelbach commented 2 weeks ago

hotfix is distributed