Hi there,
I'm writing a report in/with Latex and I need to draw some colored lines like:
---------------xxxxxxxxxxxx
xxxxxxxxxxxxxxx------------
where ------ is a red line and xxxxx blue
And it would be perfect if it can be thick lines also...
Does anyone have an idea how to create this in/with latex. Is there some kind of package that I would need?
I really appreciate all kinds of help!
Regards
A.
Graphics, Figures & Tables ⇒ colored lines
NEW: TikZ book now 40% off at Amazon.com for a short time.

colored lines
Hi,
in the following example code I defined two new commands to draw colored lines with variable thickness. The code explains the syntax:
in the following example code I defined two new commands to draw colored lines with variable thickness. The code explains the syntax:
Code: Select all
\documentclass{article}
\usepackage{xcolor}
\makeatletter
% \cvhrulefill{<color>}{<thickness>}
\newcommand*\cvhrulefill[2]{%
\leavevmode\color{#1}\leaders\hrule\@height#2\hfill \kern\z@\normalcolor}
% \crule{<color>}{<width>}{<thickness>}
\newcommand*\crule[3]{%
\color{#1}\rule{#2}{#3}\normalcolor}
\makeatother
\begin{document}
\cvhrulefill{red}{2pt}\cvhrulefill{red}{2pt}\cvhrulefill{blue!40}{2pt}
\cvhrulefill{blue}{3pt}\cvhrulefill{red}{1pt}\cvhrulefill{green}{4pt}
\cvhrulefill{gray}{6pt}
\crule{orange}{4cm}{.4pt}\crule{purple}{4cm}{.4pt}\crule{yellow}{4cm}{.4pt}
\vspace*{1cm}
\crule{olive}{4cm}{2cm}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: colored lines
Hi
Thank you very very very much!!!

Thank you very very very much!!!


