[Tex/LaTex] CV question: How to remove the horizontal line below the name if I’m using \documentclass{moderncv} and \moderncvtheme{casual}

moderncv

I used LaTeX to write my CV. At this moment I need to remove the horizontal line that appears below my name (this line only appears at the top of the first page of the CV). How can I do this? Thanks in advance!

Best Answer

The rule you mention is produced by \makecvtitle using

\color{color2!50}\rule{\textwidth}{.25ex}

the quickest solution is to patch \makecvtitle to supress the rule:

\documentclass{moderncv}
\moderncvtheme{casual}
\usepackage{etoolbox}

\patchcmd{\makecvtitle}
  {\color{color2!50}\rule{\textwidth}{.25ex}}
  {}
  {}
  {}

\name{John}{Doe}

\begin{document}

\makecvtitle
\section{Test section}

\end{document}

enter image description here

Related Question