latex3 / tagging-project

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

empty cell in p column produces parent-child warnings #432

Open mbertucci47 opened 2 months ago

mbertucci47 commented 2 months ago

An empty cell in a p-type column produces parent-child warnings. Example:

\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
  }
\documentclass{article}

\begin{document}
\begin{tabular}{p{2cm}p{2cm}}
A & \\
 & D
\end{tabular}
\end{document}
u-fischer commented 2 months ago

good catch. Could you try with this? I think it should handle most cases of "weird" ends:

\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
  }
\documentclass{article}
\begin{document}

\ExplSyntaxOn
\socket_set_plug:nnn{tagsupport/tbl/pcell/end}{TDpbox}
  {
    \tag_struct_end: 
    \legacy_if:nT {@endpe}{\par}
    \mode_if_vertical:T{ \tagpdfparaOff }
  } 
\ExplSyntaxOff

\begin{tabular}{p{2cm}p{2cm}}
A \par & B \\ 
\end{tabular} 

\begin{tabular}{p{2cm}p{2cm}}
A  &  \\ 
\end{tabular}

\begin{tabular}{p{2cm}p{2cm}}
A  &  B\\
   & D\\
\begin{itemize}
\item blb
\end{itemize}     
\end{tabular}

\end{document}
mbertucci47 commented 2 months ago

Looks good to me. Thanks for the quick fix!