删除 moderncv 中 header 下方的空格

删除 moderncv 中 header 下方的空格

我正在准备简历,需要更多空间来完成。我想删除标题下方的空间(红色),并减少章节和段落之间的空间

moderncv

我的代码:

    \documentclass[11pt,a4paper]{moderncv}
\usepackage[francais]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[scale=0.95]{geometry}

\moderncvtheme[blue]{classic}
\firstname {Name}
\lastname {LastName}
\title {Job}
\address{Adress}{Adress}
\mobile {123456}
%\phone {number}
\email {[email protected]}
\social[linkedin][link]{name}
%\homepage {link}
%\extrainfo {}
\photo[70pt][0.6pt]{maphoto}
\quote {}


\begin{document}

\makecvtitle
\vspace*{-20mm}

\section{Formation}
\cventry{2015--2017}{Text}{}{}{}{Text.}
\cventry{2012--2015}{Text}{}{}{}{Text}
\cventry{2008--2012}{Text}{}{}{}{Text}

\section{Expériences professionnelles}
\cventry{Juin 2016}{Text}{}{}{}{Text}

\section{Projets académiques}
\cventry{Jan 2016 - Mai 2016}{Text}{}{}{}{Text}
\end{document}

答案1

这是一种从标题中删除更多空间的方法。添加以下几行:

\usepackage{xpatch}
\xpatchcmd\makecvhead{1.25em}{0em}{}{}% <<<<< 0em = space between name and title
\xpatchcmd\makecvhead{[b]}{[t]}{}{}
\xpatchcmd\makecvhead{[b]}{[t]}{}{}
\xpatchcmd\makecvhead{[b]}{[t]}{}{}
\makeatletter
\xpatchcmd\makecvhead
  {\includegraphics[width=\@photowidth]{\@photo}}%
  {\raisebox{-1.6cm}{\includegraphics[width=\@photowidth]{\@photo}}}% <<<<< -1.6cm: modify to align the image with the rest
  {}{}
\makeatother
\begin{document}
\makecvtitle
\vspace*{-40mm}% <<<< modify to adjust the distance between title and contents

根据需要调整上面标记的三个数字。请注意,这实际上是一种黑客行为,可能会在下一版中停止工作moderncv

enter image description here

\documentclass[11pt,a4paper]{moderncv}
\usepackage[francais]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[scale=0.95]{geometry}

\moderncvtheme[blue]{classic}
\firstname {Name}
\lastname {LastName}
\title {Job}
\address{Adress}{Adress}
\mobile {123456}
%\phone {number}
\email {[email protected]}
\social[linkedin][link]{name}
%\homepage {link}
%\extrainfo {}
\photo[70pt][0.6pt]{example-image}
\quote {}

\usepackage{xpatch}
\xpatchcmd\makecvhead{1.25em}{0em}{}{}
\xpatchcmd\makecvhead{[b]}{[t]}{}{}
\xpatchcmd\makecvhead{[b]}{[t]}{}{}
\xpatchcmd\makecvhead{[b]}{[t]}{}{}
\makeatletter
\xpatchcmd\makecvhead
  {\includegraphics[width=\@photowidth]{\@photo}}%
  {\raisebox{-1.6cm}{\includegraphics[width=\@photowidth]{\@photo}}}%
  {}{}
\makeatother
\begin{document}
\makecvtitle
\vspace*{-40mm}

\section{Formation}
\cventry{2015--2017}{Text}{}{}{}{Text.}
\cventry{2012--2015}{Text}{}{}{}{Text}
\cventry{2008--2012}{Text}{}{}{}{Text}

\section{Expériences professionnelles}
\cventry{Juin 2016}{Text}{}{}{}{Text}

\section{Projets académiques}
\cventry{Jan 2016 - Mai 2016}{Text}{}{}{}{Text}
\end{document}

相关内容