latex3 / tagging-project

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

\cline errors in tabular #134

Open u-fischer opened 1 month ago

u-fischer commented 1 month ago
\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
    uncompress
  }
\documentclass{article}

\begin{document}
\begin{tabular}{crl}
A & B & D \\ \cline{1-2}
E & F & G
\end{tabular}
\end{document}
! Undefined control sequence.
<argument> \ERRORtbl 
                     /row
l.199 \end{tabular}

Something like this is needed to reset the row count and tag the rules as artifact:

\makeatletter\ExplSyntaxOn
\def\@cline#1-#2\@nil{%
  \omit
  \@multicnt#1%
  \advance\@multispan\m@ne
  \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
  \@multicnt#2%
  \advance\@multicnt-#1%
  \advance\@multispan\@ne
   \tag_mc_begin:n{artifact}%<-----------
  \leaders\hrule\@height\arrayrulewidth\hfill %artifact tagging needed
   \tag_mc_end: %<------------
  \tbl_gdecr_row_count: %<----------------
  \cr
  \noalign{\vskip-\arrayrulewidth}}
\ExplSyntaxOff
FrankMittelbach commented 1 month ago

This has been corrected in latex-dev and will show up in the next dev release