latex3 / tagpdf

Tagging support code for LaTeX
59 stars 7 forks source link

Text before table environment must be separated by it from an explicit `\par` or blank line #77

Closed jfbu closed 8 months ago

jfbu commented 1 year ago
\DocumentMetadata{testphase={phase-III}}
\documentclass{article}
\begin{document}
\begin{table}[htbp]
First table\par
\end{table}
Text.
\begin{table}[htbp]
Second table\par
\end{table}
\end{document}

creates:

Package tagpdf Warning: Rule 'P/' --> 'text-unit/user' is not allowed (struct
(tagpdf)                5, /text --> struct 6)

Package tagpdf Warning: Rule 'P/' --> 'text/user' is not allowed (struct 6,
(tagpdf)                /text-unit --> struct 7)

test_tagging_tables.log

The Text. must be ended by explicit \par, or blank line.

Caveat: before opening this ticket I only searched for "table" in file tagpdf.pdf. Sorry if that is documented somewhare. But I spend quite some time reducing from real life example.

jfbu commented 1 year ago

Actually, it is not being between two table environments, but simply being before one.

\DocumentMetadata{testphase={phase-III}}
\documentclass{article}
\begin{document}
Text.
\begin{table}[htbp]
First table\par
\end{table}
% \begin{table}[htbp]
% Second table\par
% \end{table}
\end{document}
Package tagpdf Warning: Rule 'P/' --> 'text-unit/user' is not allowed (struct
(tagpdf)                3, /text --> struct 4)

Package tagpdf Warning: Rule 'P/' --> 'text/user' is not allowed (struct 4,
(tagpdf)                /text-unit --> struct 5)
u-fischer commented 1 year ago

floats need some code that I have currently only locally. With it your code works (with and without the \par).

u-fischer commented 8 months ago

I'm closing this as the warnings are gone, but will open a new issue in the tagging project, as there is still a faulty mc-nesting.