I'm very used to come here often to debug my code and find solutions to my problem. But it's the first time i cannot find a solution to my exact problem or something i could adapt for my case. So here i am with my question. Sorry in advance if my wording is not perfect, i'm not a TeX expert but rather an enthusiast.

I am currently writing a .cls class file to write my reports. I renew the maketitle command to create my cover page. There are 2 tables i want to fill automatically. A MWE example

My main tex file is built as follows:


2015-03-31 & John Doe\\ \hline
2015-04-01 & Jane Doe\\ \hline
& \\ \hline

Company A & John Doe\\ \hline
Company B & Jane Doe\\ \hline


I use the commands \revision and \diffusion to pass the content of the table into my class file. The class is built as follows:

% My class
\ProvidesClass{MyClass}[my beautiful class]

% -- Some packages






\rowcolor{softgray} Date & Author \\ \hline

% Not working starting from here
    colspec = {|l|X|},
    rowsep = 3pt,
    width = \textwidth,
    \SetCell{bg=softgray}\textbf{Company} & \SetCell{bg=softgray}\textbf{Name} \\ \hline

The tables need to have the first row with a gray background. I had issues with pdf viewers where the border lines of the tables would disappear (covered by the background color). I could find partial solution here.

  • I found on this website that i could use NiceTabularX with the option [colortbl-like] to avoid the problem of the lines disappearing. It works (see the table built in the \section*{Revision}). However, i have to call pdfLaTeX 3 or 4 times for the table to appear finally properly. Is this normal ? Is there a workaround ?
  • I found that it works better with tabularray. However, i have an error. Somehow, the parameter \nt@revision is not passed properly. I do not understand what is happening ?
  • Is there something i missed, a better solution to do what i want to do ?

Thanks in advance for your help.

  • You would have to tell tblr to expand \nt@revision: \begin{tblr}[expand=\nt@revision]{ Jan 4 at 12:25
  • Thank you so much ! It works exactly as i intended. Jan 4 at 13:51
  • Can you make it an answer and not a comment so i can approve your answer and close this topic? And hopefully this will help others in the future. Jan 4 at 13:52
  • Concerning nicematrix, it's normal to have to do several compilations with nicematrix. However, there are several tools, such as latexmk which determine the right number of compilations for you. Jan 7 at 12:41
  • Why is it normal to do several compilations ? I think i used it in the past and i do not recall doing several compilations. But maybe i'm wrong. Jan 9 at 9:52

1 Answer 1


You would have to tell tblr to expand \nt@revision:

    colspec = {|l|X|},
    rowsep = 3pt,
    width = \textwidth,
    \SetCell{bg=softgray}\textbf{Company} & \SetCell{bg=softgray}\textbf{Name} \\ \hline

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .