I'm trying to make the following table:
I can create the structure easily. However I have a problem in the row colour:
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % table type
\begin{table}[H]
\caption{Summary}
\label{tab:Summary}
\makebox[\textwidth]{ %to center the table if exceed page width
\begin{tabular}{L{1cm} L{4cm} L{4cm} L{4cm}}
%Title
\hline \rowcolor{black}
\multicolumn{4}{L{13cm}}{\textcolor{white}{Title goes here}} \TBstrut \\
\hline \rowcolor{black}
%
\textcolor{white}{id} &
\textcolor{white}{Description} &
\textcolor{white}{Formula} &
\textcolor{white}{Notes} \TBstrut \\ \hline
%
text & text & $equation$ & Text \TBstrut \\ \hline
\end{tabular}}
\end{table}
I get the following:
I also tried replacing it with the following but I get the same result
\multicolumn{4}{L{13cm}}{\cellcolor{black}\textcolor{white}{Title goes here}} \TBstrut \\
I assume that this is due the missing margins (left/right) from the border for each cell. Any idea how to fix?
Note that the cell type is from: How to create fixed width table columns with text raggedright/centered/raggedleft?



\multicolumn{4}{L{13cm}}{...}to\multicolumn{4}{l}{...}? – Mico Apr 28 '20 at 03:31