I want to draw a a line like that in blue. In my code snippet, i use the variable color1
which is given by moderncv itself.
\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage{fontenc}
\usepackage{graphicx}
\usepackage{xcolor}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\renewcommand*{\rule}[2]{\def\@rule{\color{color1}{#1}{#2}}}
\begin{document}
\makecvtitle
\hbox{
\hspace*{0.2\textwidth}
\rule{5pt}{\textwidth}
\hspace*{0.05\textwidth}
}
\end{document}
why does that not work here? When compiling that with latexmk -xelatex $file
i just get a plain white site with just the name John Doe on it.
\textcolor{color1}{\rule{5pt}{\textwidth}}
? (And where did you get this curious redefinition?)