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.

1 Answer 1

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)

3
  • 1
    Needless to load colortbl with the [table] option of xcolor.
    – Bernard
    May 3, 2017 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?
    – Schwale
    May 3, 2017 at 23:30
  • @Ustanak simply use \arrayrulecolor{white} before the white hlines, and switch back with \arrayrulecolor{color} afterwards
    – Moriambar
    May 4, 2017 at 8:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .