# [texhax] using multirow and rowcolor together

Rob Messer rmesser at intellisurvey.com
Sat Nov 20 16:44:26 CET 2010

To answer my own question, I searched around some more and read the comments in multirow.sty and found that the answer is to do multirow from the bottom up -- so have no value in the upper row and do multirow{-2}, like this:

\begin{tabular}{ | p{4cm} | *{3}{ >{\centering}p{2cm} |} }
\hline
\rowcolor{lightgray}
& & \multicolumn{2}{>{\columncolor{lightgray}}c|}{Gender}\tabularnewline
\rowcolor{lightgray}
\multirow{-2}*{Results} &
\multirow{-2}*{All records} &
Male & Female \tabularnewline
\hline
test & 75\% & 80\% & 70\% \tabularnewline
\hline
\end{tabular}

This produces the attached output, which is close to what I'm looking for.  Now the only issue is this: how do I get rid of the very small (1pt it appears) lines that show up where the \hline would normally be?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.pdf
Type: application/pdf
Size: 15343 bytes
Desc: not available
URL: <http://tug.org/pipermail/texhax/attachments/20101120/dc5e8c78/attachment-0001.pdf>
-------------- next part --------------

On Nov 19, 2010, at 8:23 PM, Rob Messer wrote:

> I'm trying to use multirow in a colored table, and I'm running into a problem where the color seems to appear on top of the text in the multirow cell, thus partially obscuring the text.  Attached is the example pdf output, and the .tex file I am using.
>
> So, is there something I'm doing wrong here, or any suggestions to fix it?  It seems to affect all the various table environments -- I tried tabular, tabularx, longtable, and supertabular.  Thanks in advance for any advice.
>
> Rob
>
>
> <example.pdf>
> <example.tex>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/