I have been trying to produce some aesthetically appealing tables for my MSc thesis. This link has helped me a lot: Professional-looking tables with alternating row colors?
A challenge, however, remains. I really do not know how to use the information presented by the aforementioned link to produce a table with a multiple-line heading. I will try to make things a tad easier to understand with an example:
This is the code I have:
\begin{table}[htp]
\begin{center}
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{l r r}
\topline
\headcol statement & \multicolumn{2}{c}{mean rates} \\
\headcol & system A & system B \\
\midline
1. statement 1 & \textbf{4.2} & 4.1\\
\rowcol 2. statement 2 & \textbf{3.8} & 3.7 \\
3. statement 3 & \textbf{4.2} & 4.0 \\
\rowcol 4. statement 4 & \textbf{4.3 }& 4.2\\
\bottomlinec
\end{tabular}
\end{center}
\caption[First table]{First table}
\label{tab:statements_group_1}
\end{table}
I used the following definitions (from the previous link)
\documentclass{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{colortbl}% http://ctan.org/pkg/colortbl
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\colorlet{tableheadcolor}{gray!25} % Table header colour = 25% gray
\newcommand{\headcol}{\rowcolor{tableheadcolor}} %
\colorlet{tablerowcolor}{gray!10} % Table row separator colour = 10% gray
\newcommand{\rowcol}{\rowcolor{tablerowcolor}} %
% Command \topline consists of a (slightly modified) \toprule followed a \heavyrule rule of colour tableheadcolor (hence, 2 separate rules)
\newcommand{\topline}{\arrayrulecolor{black}\specialrule{0.1em}{\abovetopsep}{0pt}%
\arrayrulecolor{tableheadcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{black}}
% Command \midline consists of 3 rules (top colour tableheadcolor, middle colour black, bottom colour white)
\newcommand{\midline}{\arrayrulecolor{tableheadcolor} \specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%
\arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{black}}
% Command \rowmidlinecw consists of 3 rules (top colour tablerowcolor, middle colour black, bottom colour white)
\newcommand{\rowmidlinecw}{\arrayrulecolor{tablerowcolor} \specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%
\arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{black}}
% Command \rowmidlinewc consists of 3 rules (top colour white, middle colour black, bottom colour tablerowcolor)
\newcommand{\rowmidlinewc}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%
\arrayrulecolor{tablerowcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{black}}
% Command \rowmidlinew consists of 1 white rule \newcommand{\rowmidlinew} {\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}}
% Command \rowmidlinec consists of 1 tablerowcolor rule
\newcommand{\rowmidlinec}{\arrayrulecolor{tablerowcolor} \specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}}
% Command \bottomline consists of 2 rules (top colour
\newcommand{\bottomline}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%
\newcommand{\bottomlinec}{\arrayrulecolor{tablerowcolor} \specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%
I was wondering if you could help me find out why part of the header (mean rates) is not coloured in dark grey.
