我正在尝试减小标题字体大小,但“|”分隔符与文本大小不匹配。是否可以将其更改为其他符号(如“--”)或减小其字体大小以匹配其余标题大小?
以下是我目前所掌握的信息:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage{lipsum}
\usepackage[scale=0.75]{geometry}
\firstname{\large John}
\familyname{\large Doe}
\title{\large Machine Learning | Data Science}
\address{52 Mercer's Drive}{St. John's, NL}
\email{[email protected]}
\begin{document}
\makecvtitle
\end{document}
它看起来是这样的:
答案1
分隔线的默认大小设置为\Huge
。您应该重新定义名称和标题的字体相关设置,就像我下面所做的那样。
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\makeatletter
\renewcommand*{\namefont}{\large\bfseries\upshape}% Default is \Huge\bfseries\upshape
\renewcommand*{\titlefont}{\large\mdseries\upshape}% Default is \Huge\bfseries\upshape
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2!85}{~$|$~\@title}}}% Default is {\titlefont\textcolor{color2!85}{#1}}
\makeatother
\firstname{Example}
\familyname{Doe}
\title{Machine Learning~\texorpdfstring{$|$}{|}~Data Science}
\address{52 Mercer's Drive}{St.\ John's, NL}
\email{[email protected]}
\begin{document}
\makecvtitle
\end{document}