Consider the following table:
\documentclass[a4paper]{report}
\usepackage{multirow}
\usepackage[table]{xcolor}
\begin{document}
\begin{table}
\rowcolors{1}{gray!15}{gray!15}
\centering
\begin{tabular}{rrrrr}
\rowcolor{gray!50}
Header & 1 & 2 & 3 & 4 \\
Row1 & a & b & c & d \\
\multicolumn{1}{c}{\multirow{2}[0]{*}{Multirow1}} & a1 & b1 & c1 & d1 \\
\multicolumn{1}{c}{} & a2 & b2 & c2 & d2 \\
Row2 & aa & ab & ac & ad \\
\end{tabular}
\end{table}
\end{document}
What I am not happy with is the fact that "Multirow1" is now half hidden. Furthermore, instead of the colors gray!15
and gray!50
I want to use RGB values. Not sure how to do this though.
Best Answer
I suppose the lower cell is filled with colour after the
multirow
is created, hence covering up its contents. If you instead move themultirow
to the lowest row, and use-2
instead of2
, it works better.To define colours using RGB values, use either
where
<color>
is in the interval [0,1], orwhere
<color>
is integers in the interval [0,255].