I am writing LaTeX code to generate a long table using longtable package and I want the first column color to be gray
Here is my code:
\documentclass[a4paper,11pt,english]{report} \usepackage{longtable} \usepackage{multirow} \usepackage{graphicx} \usepackage[table,xcdraw]{xcolor} \usepackage{lipsum} % just for dummy text- not needed for a longtable \begin{document} \lipsum[1] \lipsum[1] \lipsum[1] \definecolor{lightgray}{HTML}{EFEFEF} \begin{longtable}[H]{| >{\columncolor{lightgray}}p{0.2\linewidth} | p{0.175\linewidth} |} \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline foo & bar \\ \hline \caption{Your caption here} % needs to go inside longtable environment \label{tab:myfirstlongtable} \end{longtable} Table \ref{tab:myfirstlongtable} shows my first longtable. \end{document} The problem with the produced table is that horizontal lines doesn't appear in the colored area. Here is my output: 
I know that the problem is related to the pdf viewer and that my code works fine with other pdf viewers but I am obliged to use this pdf viewer
Note: I solved this problem before in other tables using NiceTabular but NiceTabular is not compatible with longtables so I don't know how to solve this problem in longtable environment
Any help ?



[H]option.tabularray...