My question is similar to the one here How do I eliminate the vertical realignment when using arrayrulecolor with cmidrule? but can not be solved with the suggested answer (because the lines are trimmed).
I'd like to make a table with trimmed horizontal lines (as they can be generated by \cmidrule
from package booktabs
) but with changing colors.
An example:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\begin{document}
\begin{tabular}{lll}
column 1 & column 2 & column 3 \\ \cmidrule[2pt](lr){1-1}\arrayrulecolor{blue}\cmidrule[2pt](lr){2-2}\arrayrulecolor{black}\cmidrule[2pt](lr){3-3}
text & text & text\\ \cmidrule[0.4pt](lr){1-1}\cmidrule[0.4pt](lr){2-2}\cmidrule[0.4pt](lr){3-3}
text & text & text\\ \cmidrule[0.4pt](lr){1-1}\cmidrule[0.4pt](lr){2-2}\cmidrule[0.4pt](lr){3-3}
\end{tabular}
\end{document}
This does pretty much what I want but the horizontal lines are realigned vertically after every color change. How can I omit this realignment?