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)
  • 3
    You could check the package nicematrix...
    – Rmano
    Sep 27, 2021 at 10:10
  • 6
    nicematrix or tabularray Sep 27, 2021 at 10:17
  • 2
    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

2 Answers 2


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




 Alpha   & Beta  & Gamma  \\
 Epsilon & Zeta  & Eta    \\
 Iota    & Kappa & Lambda \\


enter image description here

  • 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.
    – L.J.R.
    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.


    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                    \\


Output of the first code

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.