latex3 / tagpdf

Tagging support code for LaTeX
59 stars 7 forks source link

Paratagging causes extra blank line after display math #86

Closed wangweixuan closed 9 months ago

wangweixuan commented 11 months ago

Paratagging causes an extra blank line when display math is followed by a paragraph break.

\DocumentMetadata{}
\RequirePackage{tagpdf}
\tagpdfsetup{activate, paratagging}

\documentclass{article}

\begin{document}
Eaque laboriosam necessitatibus itaque suscipit modi.
\[a+b=c.\]

Non reprehenderit tempora corporis perspiciatis cum quod aut.
\end{document}

Result: PDF with an extra blank line

Happens with pdflatex(-dev). Does not happen with lualatex(-dev), unless paratagging-show is used.

tagpdf-test.log

u-fischer commented 11 months ago

yes there is a literal which affects spacing. You need proper math tagging to resolve that, so you should load the math-code from latex-lab (but that has another problem I discovered through your example: https://github.com/latex3/tagging-project/issues/11).

Generally I recommend to load the tagging code through the testphase keys and not as package:

\DocumentMetadata{testphase={phase-II,math}}