3

Any suggestions on removing the vertical line between name and title using ModernCV style banking? Looks very weird in case of a long name.

enter image description here

I got to the styling document but haven't been able to understand it.

Minimal code to reproduce:

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{banking}
\moderncvcolor{burgundy}

\usepackage[scale=0.75]{geometry}
\usepackage{enumitem}

\name{This is a very long name}{A}
\title{\newline Curriculum Vit\ae{}}

\begin{document}

\makecvtitle

\end{document}
2
  • Could you post a full, yet minimal code that we can play with?
    – Bernard
    Aug 19, 2018 at 23:12
  • @Bernard Added.
    – Lord Zsolt
    Aug 19, 2018 at 23:26

2 Answers 2

4

My answer is based on this, credit should always be given. The solution will fulfill your requirement and will also eliminate the need to use \newline in the title.

Output

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{banking}
\moderncvcolor{burgundy}

\usepackage[scale=0.75]{geometry}
\usepackage{enumitem}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\makehead
   {\titlestyle{~|~\@title}}%
   {\newline\newline\titlestyle{\@title}}%
   {}{}
\makeatother
\name{This is a very long name}{A}
\title{Curriculum Vit\ae{}}

\begin{document}

\makecvtitle

\end{document}
2
  • I'm generally onboard with the whole "Google your issue with TeX, find some random script on SO, paste it, it works magically, you have no idea why" train, but mind explaining what this does? I presume you patch the makehead command, which is somewhere inside makecvtitle, but how did you get this syntax?
    – Lord Zsolt
    Aug 20, 2018 at 16:30
  • Sure! If you go and visit 2015/07/28 v2.0.0 modern curriculum vitae and letter header: 6, there will be \@initializecommand{\makehead}{% ... is the command that controls the title which is what we want to change. Now, we patch it via \xpatchcmd which is \xpatchcmd{<command>}{<search>}{<replace>}{<success>}{<failure>}. That is all! Hopefully it make sense. Aug 20, 2018 at 17:19
0

It is not an elegant answer, but it works:

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{banking}
\moderncvcolor{burgundy}

\usepackage[scale=0.75]{geometry}
\usepackage{enumitem}

\usepackage{tikz}
\usetikzlibrary{tikzmark}

\name{This is a very long name}{A\tikzmark{a}}
\title{\newline Curriculum Vit\ae{}}

\begin{document}

\makecvtitle

\begin{tikzpicture}[overlay,remember picture]
    \fill[white] ([yshift=-.2cm]pic cs:a) rectangle +(1,.9);
\end{tikzpicture}

\end{document}

Here is the output:

Screenshot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .