我无法安排姓名和电子邮件部分的位置。我想将电子邮件部分移到我的名字下面,然后将姓名 + 电子邮件移动到与照片相同的高度(到附图中的虚线处),但我找不到这样做的方法。
梅威瑟:
\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage{lipsum}
\usepackage[scale=0.8, top=1.5cm, bottom=1cm]{geometry}
\setlength{\hintscolumnwidth}{3cm}
%----------------------------------------------------------------------------------------
% NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------
\firstname{First name} % Your first name
\familyname{Last name} % Your last name
\title{}
\email{[email protected]}
\photo[100pt][0pt]{Head.jpg}
%----------------------------------------------------------------------------------------
\begin{document}
\makecvtitle % Print the CV title
\vspace*{-0.5cm}
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\section{Education}
\cventry{2017--2019}{M.S. in Physics}{}{}{}{}
\cventry{2013--2017}{B.S. in Physics}{}{}{}{}
答案1
要获得您想要的东西,需要几个步骤:
- 选择适合头部的银行业务
- 删除
centering
姓名和电子邮件地址 - 更改姓名和电子邮件地址使用的文本宽度
- 使用包
eso-pic
插入所需图像 - 使用正文来设置
classic
文档的样式
请注意,您必须使用所使用的值,它们取决于您正在使用的图像......
现在让我们逐一看一下这些步骤:
风格
banking
:\moderncvstyle[left,norules]{banking}
删除
centering
:\patchcmd{\makehead} {% \centering% }%%search {% % <================================================================ }%%replace {}%%success {fehler}%%failure
改变
textwidth
:\patchcmd{\makehead} {% \setlength{\makeheaddetailswidth}{0.8\textwidth}% }%%search {% \setlength{\makeheaddetailswidth}{0.9\textwidth}% <================= }%%replace {}%%success {fehlerb}%%failure
使用包
eso-pic
:\usepackage{eso-pic} % <================================================ \newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{% \put(\LenToUnit{15.5cm},\LenToUnit{-3.5cm}){#1}% <===================== x-axis, y-axis }}% \AddToShipoutPictureBG*{% \AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{white}{white}% {\includegraphics[width=80pt,height=3cm,keepaspectratio]{example-image}}% <==================== }% }
使用主体样式
classic
:\moderncvbody{1}
请注意,您必须使用所使用的值,它们取决于您正在使用的图像......
请参阅以下完整的 MWE(重要代码以 标记<=====
):
\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle[left,norules]{banking} %<================================ classic casual
\moderncvcolor{blue}
\usepackage{lipsum}
\usepackage[scale=0.8, top=1.5cm, bottom=1cm]{geometry}
\setlength{\hintscolumnwidth}{3cm}
\patchcmd{\makehead}
{%
\centering%
}%%search
{%
% <================================================================
}%%replace
{}%%success
{fehler}%%failure
\patchcmd{\makehead}
{%
\setlength{\makeheaddetailswidth}{0.8\textwidth}%
}%%search
{%
\setlength{\makeheaddetailswidth}{0.9\textwidth}% <=================
}%%replace
{}%%success
{fehlerb}%%failure
\usepackage{eso-pic} % <================================================
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
\put(\LenToUnit{15.5cm},\LenToUnit{-3.5cm}){#1}% <===================== x-axis, y-axis
}}%
\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{white}{white}%
{\includegraphics[width=80pt,height=3cm,keepaspectratio]{example-image}}% <====================
}%
}
\name{First name}{Last name} % Your first name Your last name
\title{}
\email{[email protected]}
%\photo[100pt][0pt]{example-image}
\moderncvbody{1} % <==================================================== classic body
\begin{document}
\makecvtitle % Print the CV title
\vspace*{-0.5cm} % <==================================================== better not??
\section{Education}
\cventry{2017--2019}{M.S. in Physics}{Test}{TestTest}{Test}{Test Test Test Test Test Test}
\cventry{2013--2017}{B.S. in Physics}{}{}{}{}
\end{document}
及其生成的pdf: