# Remove blank line in moderncv

I'm currently creating a CV with moderncv in Overleaf. I'm using pdfLaTeX and the 2014 (Legacy) version of TeX Live. (I am trying to reuse a template from my professor which displays incorrectly if using a more recent version). There are still a few problems I am having with getting my output to display correctly. Here is my code:

\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{black}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.76]{geometry}
\name{John}{Doe}
\title{Resumé tite}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}

\begin{document}
\makecvtitle

\section{EMPLOYMENT}
\vspace{1pt}
\cventry{}{}{Assistant Professor}{Since March 2020}{}{Department
of LaTeX, Science University}{}

% --------------------------------------------------------------------
\section{EDUCATION}
\vspace{1pt}
\cventry{}{}{PhD, Science University}{2019}{}
{Thesis title: \textit{Lorem Ipsum} \\ Supervisor: Jacob Smith}{}

\end{document}


I would like to be able to increase the vertical space between the title line and the address line. I would also like to remove the blank lines between the bolded text and the normal text underneath (e.g. "Assistant Professor" and "Department of LaTeX, Science University").

I would like to be able to increase the vertical space between the title line and the address line.

If you are using banking style of moderncv, the definition of \makehead is defined in moderncvheadiii.sty as follows:

\@initializecommand{\makehead}{%
\hfil%
\centering%
\namestyle{\@firstname~\@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\
\if@details{%

...

}


So all what you need to do is to hack this to insert some vertical space between \\ and \if@details. This is all the hack you need to do around \makecvtitle in your document:

\begin{document}
\makeatletter
\let\if@detailsoriginal\if@details
\def\if@details{\vskip1.0\baselineskip\if@detailsoriginal}
\makecvtitle
\let\if@details\if@detailsoriginal
\makeatother


You can change the space amount by modifying the value of 1.0\baselineskip.

Result:

I would also like to remove the blank lines between the bolded text and the normal text underneath (e.g. "Assistant Professor" and "Department of LaTeX, Science University").

If you are using banking style of moderncv, the definition of \cventry is defined in moderncvbodyiii.sty as follows:

\renewcommand*{\cventry}[7][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%
{\bfseries #4} & {\bfseries #5}\\%
{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%

...

}


You see a tabular* environment inside. So what you need to do is to change \arraystretch. For example, if you write this in your preamble you can smash the interline between the bolded text and the normal text by setting the stretch zero:

\let\cventryoriginal\cventry
\def\cventry#1#2#3#4#5#6#7{\bgroup\renewcommand\arraystretch{0}\cventryoriginal{#1}{#2}{#3}{#4}{#5}{#6}{#7}\egroup}


Result:

Again, you can change the amount of vertical space by modifying the value of \arraystretch{0}.

Update: as for moderncv 2012 ver.

The title command \makecvtitle calls for \maketitle which is defined in moderncvstylebanking.sty as follows:

\renewcommand*{\maketitle}{%
\setlength{\maketitlewidth}{0.8\textwidth}%
\hfil%
\parbox{\maketitlewidth}{%
\centering%
\namestyle{\@firstname~\@familyname}%
\ifthenelse{\isundefined{\@title}}{}{\titlestyle{~|~\@title}}\\%

...

}


So all what you need to do is to hack this to insert some vertical space between \\ and \addressfont. This is all the hack you need to do around \makecvtitle in your document:

\begin{document}

You can change the space amount by modifying the value of 1.0\baselineskip.
• Thanks for you help! I tried both codes and they work! I managed to fix the second problem, but I'm still having trouble with the first problem. Unfortunately, the first code you gave only works with newer versions of Tex Live, which I am unable to use because of display issues when I run my code with newer versions. Would you happen to know how to make a similar hack with the 2014 (or earlier) version of moderncv? I think the relevant definitions are in moderncvstylebanking.sty as moderncvheadiii.sty did not exist at the time. – A.B. Jul 29 at 1:23
• Edit: It's line 103 in moderncvstylebanking.sty for moderncv version 1.2.0. launchpad.net/moderncv/+milestone/1.2.0 – A.B. Jul 29 at 2:07