Closed DavidEGx closed 2 months ago
colortbl overwrites the \hline definition and this breaks the tagging code.
It seems to work if one handles the multispan similar to the booktabs firstaid, but there aren't many testfiles around.
(edited to use \tbl_gdecr_row_count:
instead of the internal int)
\DocumentMetadata{
lang = en,
pdfversion = 2.0,
pdfstandard = ua-2,
testphase = {phase-III, table},
}
\documentclass[10pt]{article}
\usepackage{longtable}
\usepackage{colortbl}
\begin{document}
\makeatletter
\ExplSyntaxOn
\def\LT@@hline{%
\ifx\LT@next\hline
\global\let\LT@next\@gobble
\ifx\CT@drsc@\relax
\gdef\CT@LT@sep{%
\noalign{\penalty-\@medpenalty\vskip\doublerulesep}}%
\else
\gdef\CT@LT@sep{%
\multispan\LT@cols{%
\tag_mc_begin:n{artifact}
\CT@drsc@\leaders\hrule\@height\doublerulesep\hfill
\tag_mc_end: \tbl_gdecr_row_count:
}\cr}%
\fi
\else
\global\let\LT@next\empty
\gdef\CT@LT@sep{%
\noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}%
\fi
\ifnum0=`{\fi}%
\multispan\LT@cols
{\tag_mc_begin:n{artifact}
\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill
\tag_mc_end: \tbl_gdecr_row_count:
}\cr
\CT@LT@sep
\multispan\LT@cols
{\tag_mc_begin:n{artifact}
\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill
\tag_mc_end: \tbl_gdecr_row_count:
}\cr
\noalign{\penalty\@M}%
\LT@next}
\ExplSyntaxOff
\begin{longtable}{ p{3cm}p{3cm}}
\hline
Row 1 & 105 \\
\hline\hline
\end{longtable}
\end{document}
so the cause is xcolor loading colrtbl, right? so we should probably change the issue title to mention colortbl and then mark for now as not fully compatible
This should be fixed by the colortbl update in the above comment, I'll release that to ctan today
Hi,
Got this latex code:
Then I run:
and got:
Same thing using
xelatex
.Either removing:
table
in line 5.\usepackage[table]{xcolor}
in line 11.\hline
in line 16.Make it work without any issue.