2

I want to replicate the following result:

enter image description here

Here's what I have:

\documentclass{article}

\usepackage[table]{xcolor}

\definecolor{color}{RGB}{196,0,98}


\begin{document}

\arrayrulecolor{color}
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{3}{|c|}{Crimes and criminals} \\
\hline
Crimes & Criminals & Verbs \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
 &  &  \\
\hline
 &  &  \\
\hline
\end{tabular}

\end{document} 

I want to fill the cells, but I think it will need a more eleborated code.

3

You could use the rowcolor command which comes to the rescue:

\documentclass{article}

\usepackage[table]{xcolor}
\definecolor{color}{RGB}{196,0,98}


\begin{document}

\arrayrulecolor{color}
\begin{tabular}{|l|l|l|}
\hline
\rowcolor{color}
\multicolumn{3}{|c|}{\color{white}Crimes and criminals} \\
\hline
\rowcolor{color}
\color{white}Crimes &\color{white} Criminals &\color{white} Verbs \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
\hline
 &  &  \\
 &  &  \\
\hline
 &  &  \\
\hline
\end{tabular}

\end{document} 

with result:

enter image description here

EDIT The command is defined in the colortbl package which is automatically loaded by the table option of the xcolor package (thanks @Bernard)

  • 1
    Needless to load colortbl with the [table] option of xcolor. – Bernard May 3 '17 at 21:48
  • @Moriambar Thank you. It's almost what I want. Can you see the white lines below the words crimes and criminals? How can you add them? – Alejandro May 3 '17 at 23:30
  • @Ustanak simply use \arrayrulecolor{white} before the white hlines, and switch back with \arrayrulecolor{color} afterwards – Moriambar May 4 '17 at 8:52

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.