减少 moderncv 模板中的空白

减少 moderncv 模板中的空白

我想知道如何减少 moderncv latex 模板中标题后的空白,请看下面的图片:

在此处输入图片描述

编辑 :

\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

答案1

如果你不使用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}

如果您使用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}

答案2

另一个更简单的解决方案是将 放在\vspace*{-1cm}后面\maketitle

来源

相关内容