How to change hline color in LaTex

In the simplest latex .tex file , how can I colorize hline

?

I tried

\hline[color:red]

      

... and:

\hline{color:red}     

      

... but they don't work

Likewise, how can I increase the thickness (width) hline

?

+3


source to share


2 answers


You need to use colortbl

to color the standard rules tabular

(horizontal or vertical):

enter image description here



\documentclass{article}
\usepackage{colortbl}

\begin{document}
\begin{tabular}{c}
  \arrayrulecolor{red}\hline
  a \\
  \arrayrulecolor{green}\hline
\end{tabular}
\end{document}

      

+2


source


I inserted the hlines outside of the table environment and could just colorize them using the xcolor package and then {\ color {green} \ hline}.



0


source







All Articles