[Tex/LaTex] moderncv spacing after name

moderncvspacing

I am new to LaTex. I am making a cv using moderncv and want to insert some space between name and mobile/email address section.

And then remove vertical space between the email and the next section (career objective). Can someone please let me know how to do this.

\documentclass[12pt,a4paper,helvetica]{moderncv}         

\moderncvstyle{banking}    
\moderncvcolor{blue}                               
\usepackage[utf8]{inputenc}                      
\usepackage[scale=0.75,top=2.5cm]{geometry}
\usepackage{import}
\name{\large aaaa}
\phone[mobile]{xxxxxxxx}                  
\email{aaaa@.com}   
\begin{document}

\makecvtitle

\section{\small CAREER OBJECTIVE}

Best Answer

The space in the Title

to add space to your title you need to change the definition of the \makehead command.

you could either do this by copying the whole @initializecommand{\makehead} from moderncvheadiii.sty in your preamble and replace the initializecommand with a \renewcommand then edit the

\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\

to

\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\par\vspace{\baselineskip}

You could of course change the space to whatever suits you.

An alternative to that would be to patch the command, simply search and replace. Place this in your preable between \makeatletter and \makeatother:

\patchcmd{\makehead}{%search
    \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\}{%replace
      \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\par\vspace{\baselineskip}}{%success
    }{ %failure
    }

The space after the header

The space after the header (email) is easily changed, after the \makecvtitle add a \vspace, (just as the one we added in the title) only this time it can be negative: \vspace{-2cm} for instance.

here's the entire code of the solution:

\documentclass[12pt,a4paper,helvetica]{moderncv}         

\moderncvstyle{banking}    
\moderncvcolor{blue}                               
\usepackage[utf8]{inputenc}                      
\usepackage[scale=0.75,top=2.5cm]{geometry}
\usepackage{import}
\firstname{aaaa}
\familyname{bbbb}
\title{CV}
\phone[mobile]{xxxxxxxx}
\email{email@gmail.com}    

\makeatletter

\patchcmd{\makehead}{%search
    \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\}{%replace
      \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\par\vspace{\baselineskip}}{%success
    }{ %failure
    }

\makeatother

\begin{document}

\makecvtitle

\vspace{-2cm}

\section{\small CAREER OBJECTIVE}

\end{document}