I wish to make a table with multirows and colours corresponding to my examples given below, which I assume are fairly comprehensible.
Described in words I want the cells in the leftmost column to span varying numbers of rows, in addition to being every other white and grey. Furthermore, I want the rows in the rest of the columns to be every other white and grey as well.
I tried using "\rowcolors{1}{white}{lightgray}" in the table, but that did not work well together with the row spanning in the leftmost column.
Is there a way of defining every other (spanned) cell white and grey in a single column? Defining the colour of every cell seems like a lot of unnecessary work.
This table is also going to span several pages, (I have left that out of my code for simplicity) so manually drawing a table on every page is not an option.
Thanks!
Code: Select all
\documentclass[11pt, a4paper]{article}\usepackage[top=3.5cm, bottom=3.5cm, left=2cm, right=2cm]{geometry}\usepackage[latin1]{inputenc}\usepackage[T1]{fontenc}\usepackage{lmodern,microtype}\usepackage{multirow}\usepackage[table]{xcolor}\pagestyle{empty}\begin{document}\begin{table}[htbp]\centering\begin{tabular}{ |p{0.25\textwidth}|*{2}{p{0.32\textwidth}|} }\hline\multirow{5}{*}{white}& white & white \\& grey & grey \\& white & white \\& grey & grey \\& white & white \\ \hline\multirow{4}{*}{grey}& grey & grey \\& white & white \\& grey & grey \\& white & white \\ \hline\multirow{3}{*}{white}& grey & grey \\& white & white \\& grey & grey \\ \hline\end{tabular}\end{table}\end{document}