5

I have a document that I wish to distribute both in color and monochrome. It contains tables and makes use of colored rows. Problem is, when I use the monochrome option for the xcolor package the colored rows show up as completely black and thus cannot be read.

What I would like is for the text to be readable even when the monochrome option is active.

Here is a minimal example :

\documentclass{article}

\usepackage[monochrome]{xcolor}
\usepackage{colortbl}

\begin{document}
\begin{tabular}{cc}
This & that\\
\rowcolor{yellow} This & that
\end{tabular}

\end{document}

(If I remove the monochrome option all is well).

  • What should happen to a yellow row color if you use monochrome? If I use \textcolor{yellow}{text} the text appears black, too. – Qrrbrbirlbel Feb 25 '13 at 0:39
  • I'd want the colors to become shades of gray. However, on second thought, that's not really monochrome... – Sašo Živanović Feb 25 '13 at 0:39
  • 2
    @SašoŽivanović \usepackage[gray,table]{xcolor} – Qrrbrbirlbel Feb 25 '13 at 0:50
6

Add

\makeatletter
\let\CT@@do@color\relax
\makeatother

after loading colortbl (redefining the internal command rather than \rowcolor means that you stop all colortbl color commands including use of optional arguments etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.