如何修改现代银行简历样式中的标题

如何修改现代银行简历样式中的标题

我对 LaTeX 有问题,特别是我的简历标题。我使用的是moderncv带有以下banking选项的模板:

    \documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{banking} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage{xpatch}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{etoolbox}
\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name


\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{2.5cm},\LenToUnit{-5.5cm}){#1}%
 }}%

\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{white}{white}%
{\includegraphics[width=80pt,height=3cm,keepaspectratio]{pictures/giorgos}}}
}



\makeatletter

\xpatchcmd\makehead
   {\titlestyle{~|~\@title}}%
   {\par\vskip1ex\titlestyle{\@title}}%
   {}{}


\@ifpackageloaded{moderncvstylebanking}{%
\let\oldmakecvtitle\makecvtitle
\renewcommand*{\makecvtitle}{%
  {\par\vspace{10pt}}%
  \oldmakecvtitle%
}%
}{%
}
\makeatother


%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{First name} 
\familyname{Last name} 
%\title{Curriculum vitae} 


\title{\Large{}\newline{}\vspace{-0.24cm}\newline{}Curriculum vitae}


\address{Adress XXX}{Cuntry,City Post Code}
\mobile{000123456789}
\email{[email protected] }
\homepage{nl.linkedin.com/pub/george-galatis/5a/16a/9a2/}{linkedin profile} 

% The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example


%\extrainfo{additional information}

\photo[70pt][1pt]{pictures/giorgos} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)


%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle 
----------------------------------------------------
\section{Profile Summary}

\section{Work Experience}

\section{Education}

\section{Projects}

\section{Computer skills}

\section{Hobbies}


\end{document}

但我想将简历的标题编辑如下:

在此处输入图片描述

关于如何实现这一点有什么建议吗?

答案1

根据您的代码,您必须更改标题中的两件事。

首先你需要得到右对齐的文本

\xpatchcmd\makehead
   {\centering}% <======================================================
   {}%
   {}{}

此补丁程序(针对 2.0.0 版本moderncv)简单地删除了该\centering命令。

其次,您需要将标题向右移动。您可以通过减少标题宽度来实现

\xpatchcmd\makehead
   {\setlength{\makeheaddetailswidth}{0.8\textwidth}}%
   {\setlength{\makeheaddetailswidth}{0.6\textwidth}}% <================
   {}{}

使用以下 MWE(请注意,我使用的是图片中example-image的包装)mwe

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

\moderncvstyle{banking} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage{xpatch}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{etoolbox}
\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name


\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{2.5cm},\LenToUnit{-5.5cm}){#1}%
 }}%

\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{white}{white}%
{\includegraphics[width=80pt,height=3cm,keepaspectratio]{example-image}}}
}

\makeatletter

\xpatchcmd\makehead
   {\centering}% <======================================================
   {}%
   {}{}

\xpatchcmd\makehead
   {\titlestyle{~|~\@title}}%
   {\par\vskip1ex\titlestyle{\@title}}%
   {}{}

\xpatchcmd\makehead
   {\setlength{\makeheaddetailswidth}{0.8\textwidth}}%
   {\setlength{\makeheaddetailswidth}{0.6\textwidth}}% <================
   {}{}


\@ifpackageloaded{moderncvstylebanking}{%
\let\oldmakecvtitle\makecvtitle
\renewcommand*{\makecvtitle}{%
  {\par\vspace{10pt}}%
  \oldmakecvtitle%
}%
}{%
}
\makeatother


%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{First name} 
\familyname{Last name} 
%\title{Curriculum vitae} 


\title{\Large{}Curriculum vitae} % <====================================
%\title{\Large{}\newline{}\vspace{-0.24cm}\newline{}Curriculum vitae}

\address{Adress XXX}{Cuntry,City Post Code}
\mobile{000123456789}
\email{[email protected] }
\homepage{nl.linkedin.com/pub/george-galatis/5a/16a/9a2/}%{linkedin profile} 

% The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example


%\extrainfo{additional information}

\photo[70pt][1pt]{pictures/giorgos} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)


%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle 
----------------------------------------------------
\section{Profile Summary}

\section{Work Experience}

\section{Education}

\section{Projects}

\section{Computer skills}

\section{Hobbies}


\end{document}

你得到了想要的结果:

在此处输入图片描述

但最后最好重写标题创建部分以适合您的目的,例如使用表格...

相关内容