1

I'm using:

\documentclass{article}

\usepackage[table]{xcolor}

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


\begin{document}

\begin{tabular}{|l|l|l|l|}
\arrayrulecolor{fucsia}
\hline
\multicolumn{1}{!{\color{fucsia}\vline} l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Suffix}} & \multicolumn{1}{l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Agregar a}} & \multicolumn{1}{l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Significado}} & \multicolumn{1}{l !{\color{fucsia}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Ejemplo}}\\
\rowcolor{white}
-y & sustantivos &  & snowy \\
\rowcolor{white}
 &  &  & lucky \\
\hline
\rowcolor{white}
-ly & sustantivos &  & friendly \\
\rowcolor{white}
 &  & with the & weekly \\
\hline
\rowcolor{white}
-ous & sustantivos & quality of & dangerous \\
\rowcolor{white}
 &  &  & mysterious \\
\hline
\rowcolor{white}
-al & sustantivos &  & economical \\
\rowcolor{white}
 &  &  & national \\
\hline
\end{tabular}

\end{document} 

enter image description here

What I want to do is to change to while colour the horizontal lines of the third column. Except the one at the end which completes the edge of the table.

  • Maybe have a look at the multirow package. – user36296 May 4 '17 at 16:04
3

Use the hhline package as it doesn't conflict with row coloring.

\documentclass{article}
\usepackage[table]{xcolor}
\definecolor{fucsia}{RGB}{196,0,98}
\usepackage{hhline}

\begin{document}

\begin{tabular}{|l|l|l|l|}
\arrayrulecolor{fucsia}
\hline
\multicolumn{1}{!{\color{fucsia}\vline} l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Suffix}} & \multicolumn{1}{l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Agregar a}} & \multicolumn{1}{l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Significado}} & \multicolumn{1}{l !{\color{fucsia}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Ejemplo}}\\
\rowcolor{white}
-y & sustantivos &  & snowy \\
\rowcolor{white}
 &  &  & lucky \\
\hhline{--~-}
\rowcolor{white}
-ly & sustantivos &  & friendly \\
\rowcolor{white}
 &  & with the & weekly \\
\hhline{--~-}
\rowcolor{white}
-ous & sustantivos & quality of & dangerous \\
\rowcolor{white}
 &  &  & mysterious \\
\hhline{--~-}
\rowcolor{white}
-al & sustantivos &  & economical \\
\rowcolor{white}
 &  &  & national \\
\hline
\end{tabular}

\end{document} 

enter image description here

2

You can do that with hhline. I took the opportunity to simplify your code: \rowcolor{white} isn't necessary.

\documentclass{article}
\usepackage[table]{xcolor}
\definecolor{fucsia}{RGB}{196,0,98}
\usepackage{hhline}

\begin{document}

\begin{tabular}{|l|l|l|l|}
\arrayrulecolor{fucsia}
\hline
\multicolumn{1}{!{\color{fucsia}\vline} l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Suffix}} & \multicolumn{1}{l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Agregar a}} & \multicolumn{1}{l !{\color{white}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Significado}} & \multicolumn{1}{l !{\color{fucsia}\vline}}{\cellcolor{fucsia}\color{white}\textbf{Ejemplo}}\\
-y & sustantivos & & snowy \\
 & & & lucky \\
\hhline{---~}
-ly & sustantivos & & friendly \\
 & & with the & weekly \\
\hhline{---~}
-ous & sustantivos & quality of & dangerous \\
 & & & mysterious \\
\hhline{---~}
-al & sustantivos & & economical \\
 & & & national \\
\hline
\end{tabular}

\end{document}

enter image description here

  • The reason why I added \rowcolor{white} is because I'll put this table in a chart, and the chart has a different colour. It's just style. – Alejandro May 4 '17 at 16:20
  • I see. Sorry for removing it. What I had not seen is AboAmmar had posted (almost) the same code. I'll remove my answer in a moment. Comment aside: in my opinion, no white vertical rules in the first row would be nicer. – Bernard May 4 '17 at 16:26

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.