# Is there a LaTeX package available for robust rendering of tables in pdf?

Four years ago, David Carlisle sketched in this answer a way to mitigate problems with the pdf rendering of lines in cloloured tables. My question: Is there now an available LaTeX package implementing that approach?

Alternatively, is there another LaTeX package mitigating the base problem (unreliable pdf rendering of lines in tables containing gray cells, rows, or columns)?

The following options are excluded:

• Changing the table layout (there is an external format template we should follow)
• Changing to another Macro package like ConTeXt (it is a highly collaborative document of considerable length with many authors and writers)
• You could check the package nicematrix... Sep 27, 2021 at 10:10
• nicematrix or tabularray Sep 27, 2021 at 10:17
• or simply don't use rules with coloured panels (they never look nice even when they work) see for example the booktabs package guidelines on when to use vertical rules: "Never, ever use vertical rules." Sep 27, 2021 at 11:41

Tabularray package fixed this missing border problem in version 2021N for short tables, and in version 2021P for long tables.

\documentclass{article}

\usepackage{xcolor}
\usepackage{tabularray}

\begin{document}

\begin{tblr}{colspec={|l|c|r|},rowspec={|Q[cyan7]|Q[azure7]|Q[blue7]|}}
Alpha   & Beta  & Gamma  \\
Epsilon & Zeta  & Eta    \\
Iota    & Kappa & Lambda \\
\end{tblr}

\end{document}


• Accepted because it works almost out of the box, only \cline from older table markup is not really usable. Sep 30, 2021 at 10:04
• If you want to use \cline, you need remove | from rowspec. Sep 30, 2021 at 13:37

With {NiceTabular} of nicematrix, the rules are drawn by Tikz after the construction of the array (however, this requires several compilations).

The rules won't seem to disappear, even when they are near a colored panel.

\documentclass{article}
\usepackage{nicematrix}
\begin{document}

\begin{center}
\begin{NiceTabularX}{\textwidth}{>{\columncolor[gray]{0.95}}lX}[hvlines,colortbl-like]
Titre                & Some text here         \\
Date de modification & \today                 \\
Responsable          & Some name              \\
E-mail               & Sorry for the french   \\
Sujet                & Lorem Ipsum            \\
Version du document  & 2.0                    \\
\end{NiceTabularX}
\end{center}

\end{document}


• An interesting package "from future". For the tables, the newest version not only of this package but also of the experimental LaTeX3 packages are required. Sep 30, 2021 at 10:06