3

I would like to know how I can reduce the blank space after the title in the moderncv latex template, look at the picture below :

enter image description here

EDIT :

\documentclass[10pt,a4paper]{moderncv}
\moderncvtheme[blue]{classic}                
\usepackage[utf8]{inputenc}
\usepackage[top=0.3cm, bottom=1.0cm, left=1.2cm, right=1.2cm]{geometry}
% Largeur de la colonne pour les dates
\setlength{\hintscolumnwidth}{3.5cm}
\renewcommand*{\namefont}{\fontsize{20}{20}\mdseries\upshape}

\address{X}{X}{X}    
\email{X}                      
%\homepage{X}
\mobile{X} 
\usepackage{xpatch}
\xpatchcmd{\makecvhead}{%
\usebox{\makecvheadnamebox}\fi%
\\[2.5em]%
}{%
\usebox{\makecvheadnamebox}\fi%
\\[1em]%
}{}{}
%% add the following additionally
\xpatchcmd{\makecvhead}{\quotestyle{\@quote}\end{minipage}\\[2.5em]}{%
\quotestyle{\@quote}\end{minipage}\\[1em]}{}{}
\extrainfo{X}
\firstname{X}
\familyname{X} 
\title{X} 

\begin{document}
\maketitle
2

If you don't use quote:

\documentclass{moderncv}
\moderncvstyle{classic}
\usepackage[scale=0.8]{geometry}
\name{The name}{}
\title{Some title}
\address{address\\address\\address\\}
\phone[mobile]{123456789}
%\quote{some quote here}
\usepackage{xpatch}
\xpatchcmd{\makecvhead}{%
  \usebox{\makecvheadnamebox}\fi%
  \\[2.5em]%
  }{%
  \usebox{\makecvheadnamebox}\fi%
  \\[1em]%                   %%% change 1em to anything you like
  }{}{}
\begin{document}
\maketitle
\section{Formations}

\end{document}

If you use quote:

\documentclass{moderncv}
\moderncvstyle{classic}
\usepackage[scale=0.8]{geometry}
\name{The name}{}
\title{Some title}
\address{address\\address\\address\\}
\phone[mobile]{123456789}
\quote{some quote here}
\usepackage{xpatch}
\xpatchcmd{\makecvhead}{%
  \usebox{\makecvheadnamebox}\fi%
  \\[2.5em]%
  }{%
  \usebox{\makecvheadnamebox}\fi%
  \\[1em]%
  }{}{}
%% add the following additionally
\xpatchcmd{\makecvhead}{\quotestyle{\@quote}\end{minipage}\\[2.5em]}{%
  \quotestyle{\@quote}\end{minipage}\\[1em]}{}{}
\begin{document}
\maketitle
\section{Formations}

\end{document}
| improve this answer | |
  • Sorry I tried to add the code you proposed but it still doesn't work, I probably made a mistake (I'm very new to latex), please check my last edit. – otus Oct 9 '15 at 15:24
  • @otus This works for the latest version of moderncv. Please check and update. – user11232 Oct 9 '15 at 15:40
  • How can I update it ? i'm using a code given by a friend on this website : fr.sharelatex.com – otus Oct 9 '15 at 15:43
  • @otus: How do I update my TeX distribution? – user11232 Oct 9 '15 at 15:46
0

Another easier solution is to put \vspace*{-1cm} after \maketitle.

source

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.