I have a table that looks like
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{cc}
\toprule
A & B \\
\midrule
Q & M \\
W & N \\
E & B \\
R & V \\
T & C \\
Y & X \\
U & L \\
I & K \\
O & J \\
P & H \\
A & 5 \\
S & 7 \\
D & 8 \\
F & 2 \\
G & 4 \\
\bottomrule
\end{tabular}
\end{document}
The code has five-line blocks, which can be made distinguishable in the output with \midrule
, but I consider that to be too distracting, as would be to number each row. I'd like to have a lighter rule, with tweakable space above and below it. I added some grey lines with Paint to a \midrule
-less table.
Forcing a color onto \midrule
with either \textcolor
or \color
produces errors, while using \rule
allows coloring but requires making measurements to get the correct width.
Best Answer
You can use
\arrayrulecolor{<colour>}
fromcolortbl
to change the colour, and\specialrule{<width>}{<above>}{<below>}
to set a rule of specific dimensions:Note that the rule colour change is global, so you'll have to reset to
black
if it's been changed before.