GeneralHorizontal rules

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Horizontal rules

Post by juliette »

Hello,

Is there a way I can make a horizontal rule that is blue instead of black ??

I also don't want it to be all the way accross the page, the command I'm using right now is:

\\newcommand{\lineunder}{\vspace*{-8pt} \\ \hspace*{-6pt} \hrulefill \\ \vspace*{-15pt}}

but I don't know how to incorporate customized color !!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Horizontal rules

Post by gmedina »

Hi,

you could use the xcolor package and the \color command:

Code: Select all

\documentclass{article}
\usepackage{xcolor}

\newcommand{\lineunder}{\vspace*{-8pt}\par\hspace*{-6pt}\color{blue}\hrulefill\\\color{black}\vspace*{-15pt}}

\begin{document}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\lineunder

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply