Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for tagging in colortbl #47

Closed
u-fischer opened this issue Feb 20, 2024 · 0 comments
Closed

support for tagging in colortbl #47

u-fischer opened this issue Feb 20, 2024 · 0 comments

Comments

@u-fischer
Copy link

tagging of \multicolumn currently fails as colortbl redefines the new definition in array.sty (LaTeX 2024-06-01)

This here should resolve this:

\DocumentMetadata{testphase={phase-III,table},pdfversion=1.7,uncompress}
\documentclass{article}
\usepackage{colortbl}
\makeatletter\ExplSyntaxOn
\IfFormatAtLeastTF{2024-06-01}{%
\long\def\multicolumn#1#2#3{%
   \multispan{#1}\begingroup
   \tbl_update_multicolumn_cell_data:n {#1}
   \def\@addamp{\if@firstamp \@firstampfalse \else
                \@preamerr 5\fi}%
   \@mkpream{#2}\@addtopreamble\@empty
   \endgroup
   \UseTaggingSocket{tbl/colspan}{#1}%
   \def\@sharp{#3}%
   \let\CT@cell@color\relax
   \let\CT@column@color\relax
   \let\CT@do@color\relax
   \@arstrut \@preamble
   \null
   \ignorespaces}}{}  
\ExplSyntaxOff
\begin{document}
\begin{tabular}{ll}
\multicolumn{2}{l}{\cellcolor{red}Test multicolumn}\\
\rowcolor{green} A & B \\
\end{tabular}

\end{document}

(An alternative would be to add the \let commands directly to array.sty?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant