2
\documentclass[11pt,a4paper,sans]{moderncv}     
\moderncvstyle{banking}                           
\moderncvcolor{purple}                              
\usepackage[utf8]{inputenc}                      
\usepackage[scale=0.915]{geometry}
\usepackage{import}

\name{Name}{}
\phone[mobile]{ph}                 
\email{email@gmail.com}                              
\homepage{www.linkedin.com/in/profile}   

\begin{document}
\maketitle
\section{Education}
\vspace{0pt}
\item{\cventry{Expected Graduation: June 2022}{Bachelors in engineering}{Name of the university}{location}{\textit{}}{}}
\vspace{1pt}
\end{document}

Example

yo'
  • 51,322
  • https://tex.stackexchange.com/questions/437730/reduce-vertical-space-above-recipient-name-address-in-moderncv-cover-letter?rq=1 – js bibra Aug 06 '20 at 14:49

2 Answers2

2

You need to patch the command \makehead in file moderncvheadiii.sty. At the end it contains the code

    \flushmakeheaddetails}\fi}\\[2.5em]}

and \\[2.5em] is responsible for the white space you do not like. Use the following patch in your preamble

\usepackage{etoolbox} % <===============================================
\patchcmd{\makehead}{\\[2.5em]}{\\[0em]}{}{} % <========================

Change the value 0em for your needs ...

Please see the following complete MWE:

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

\moderncvstyle{banking} \moderncvcolor{purple}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.915]{geometry} \usepackage{import}

\usepackage{etoolbox} % <=============================================== \patchcmd{\makehead}{\[2.5em]}{\[0em]}{}{} % <========================

\name{Name}{} \phone[mobile]{ph}
\email{email@gmail.com}
\homepage{www.linkedin.com/in/profile}

\begin{document} \maketitle \section{Education} \vspace{0pt} \begin{itemize} % <===================================================== \item \cventry{Expected Graduation: June 2022}{Bachelors in engineering}{Name of the university}{location}{\textit{}}{} \end{itemize} % <======================================================= \vspace{1pt} \end{document}

You are using an \item without using \begin{itemize} and \end{itemize} in your code. That gives an error messages I corrected with adding \begin{itemize} and \end{itemize} to the MWE. Please see that command \item takes no parameter!

Now you have an paragraph going outside the rule as you can see in this screen shot:

resulting pdf

In my answer to question moderncv extend hrule you can find the code to correct this error.

Mensch
  • 65,388
0

After \maketitle add the following line

\vspace{-40pt} 

or change the number -40 to your liking.

enter image description here

hesham
  • 1,443