如何减少 moderncv 中个人部分和文档开始之间的差距?

如何减少 moderncv 中个人部分和文档开始之间的差距?

在此处输入图片描述

%% start of file `template.tex'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


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

% possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

% modern themes
% \renewcommand{\headrulewidth}{0.4pt}

\moderncvstyle{banking}     
% style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{green}                                % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
%\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page

% character encoding
\usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding you are using
%\usepackage{CJKutf8}                              % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean

% adjust the page margins
% \usepackage[scale=0.95, top=0cm, bottom=0cm]{geometry}
\usepackage[scale=0.95]{geometry}
% \setlength{\hintscolumnwidth}{3cm}                % if you want to change the width of the column with the dates
% \setlength{\makecvtitlenamewidth}{2cm} 
% for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...

\usepackage{import}

% personal data
\name{Harsh Gupta}{}
% \phone[mobile]{(+91) 9920178153}                   % optional, remove / comment the line if not wanted
\email{[email protected]}      

\social[linkedin]{www.linkedin.com/in/harshgupta07/}   
\social[github]{github.com/HarshGrandeur} 
% \setlength{\headheight}{150pt} 
% \setlength{\separatorrowswidth{1cm}} \

\begin{document}
%\begin{CJK*}{UTF8}{gbsn}                          % to typeset your resume in Chinese using CJK
%-----       resume       ---------------------------------------------------------
\makecvtitle

\section{SKILLS}
\textbf{Languages : } Java, Python, C, MySQL, PHP, HTML
\\
\end{document}

答案1

您可以修补该\makehead命令,例如如下:

\documentclass[11pt,a4paper,sans]{moderncv} 
\moderncvstyle{banking}     
\moderncvcolor{green}
\usepackage[scale=0.95]{geometry}

\patchcmd{\makehead}
         {\\[2.5em]} % original
         {\\[0.5em]} % modified. Replace 1em with whichever length suits your needs
         {}{}

\name{Harsh Gupta}{}
\email{[email protected]}      
\social[linkedin]{www.linkedin.com/in/harshgupta07/}   
\social[github]{github.com/HarshGrandeur} 

\begin{document}
\makecvtitle

\section{SKILLS}
\textbf{Languages : } Java, Python, C, MySQL, PHP, HTML
\end{document}

相关内容