我遇到了以下问题。我需要更改简历中姓名和职称的位置,因为我使用职称字段来表示我的学术职称,而职称需要位于姓名前面。因此,我想更改标题中的行,首先是职称,第二行是姓名。不幸的是,我自己无法做到这一点。有人知道解决方案吗?
谢谢!!
梅威瑟:
\documentclass[12pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{black}
\nopagenumbers{}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[top=2.5cm, bottom=2cm, left=2.5cm, right=2.5cm]{geometry}
\title{Dr.med.univ.}
\firstname{john}
\familyname{doe}
\address{xxroad 123}{5555 city}
\phone[mobile]{+43~1234~123123123}
\email{[email protected]}
\begin{document}
\makecvtitle
\section{Berufserfahrung}
\end{document}
答案1
您可以\patchcmd
像这样使用 etoolbox:
\patchcmd{\makecvhead}
{%
\namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
}
{%
\titlestyle{\@title}\\[1.25em]
\namestyle{\@firstname\ \@lastname}
}
{}{}
基本上会\titlestyle
切换\namestyle
完整的 MWE:
\documentclass[12pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{black}
\nopagenumbers{}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[top=2.5cm, bottom=2cm, left=2.5cm, right=2.5cm]{geometry}
\title{Dr. med. univ.}
\firstname{john}
\familyname{doe}
\address{xxroad 123}{5555 city}
\phone[mobile]{+43~1234~123123123}
\email{[email protected]}
\makeatletter
\patchcmd{\makecvhead}{%
\namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
}
{
\titlestyle{\@title}\\[1.25em]
\namestyle{\@firstname\ \@lastname}
}
{}{}
\makeatother
\begin{document}
\makecvtitle
\section{Berufserfahrung}
\end{document}
至于一个 hackish 替代方案,您可以简单地清空\title
宏并将标题插入\firstname
宏中,如下所示
\title{}
\firstname{{\huge\textit{Dr. med. univ.}}\\[12pt] john}
并随意设置“假”标题的样式。