Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change color of hline in LaTex

Tags:

latex

In a simple latex .tex file, how can i colorize an hline?

I've tried

\hline[color:red]

...and:

\hline{color:red}     

...but they don't work

Similarly, how can i increase the thickness (width) of the hline?

like image 295
JonathanSFL Avatar asked Nov 05 '14 02:11

JonathanSFL


1 Answers

You need to use colortbl to colour the default tabular rules (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}
like image 180
Werner Avatar answered Sep 22 '22 16:09

Werner