如何停止 cventry 中的斜体行

如何停止 cventry 中的斜体行

我正在使用 Overleaf 上的简历模板,我的学业记录之一部分使用了 \cventry,我很喜欢它,因为它看起来很漂亮。https://www.overleaf.com/4565321zzdfbr#/13750580/

Latex 代码如下所示:

\begin{itemize}

\item{\cventry{}{Masters in Theoretical Physics}{University of sussex}{2014 - 
current}{}{1st year result - 80 per cent (first class classification)
{\textit{}}{}}   

\item{\cventry{}{A Levels: Mathematics (A), Physics (A), Chemistry (A)}{The 
Archbishop's School, Canterbury}{2007 - 2014}{}{AS Levels: History (A), 
Further Mathematics (B)}{\textit{}}{}}  % arguments 3 to 6 can be left empty

\item{\cventry{}{Three 6th Form Prizes: Mathematics best result; Physics best 
result; Chemistry best result}{Academic Awards}{}{}{}{\textit{}}{}}

\end{itemize}

我已附加一张显示该现象的屏幕截图。How it appears

我怎样才能阻止每个部分的第二行变成斜体?

答案1

您想要进行修补,以便在排版其第二个参数时\cventry不会出现问题。\itshape

你肯定您希望项目符号出现在条目的中间吗?不要使用itemize。但是,如果您这样做,请删除项目文本周围的括号:

\item Whatever

这是代码。

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

% modern themes
\moderncvstyle{banking}
\moderncvcolor{blue}

% character encoding
\usepackage[utf8]{inputenc}

% adjust the page margins
\usepackage[scale=0.75]{geometry}

\usepackage{textcomp,xpatch}

%%% Patch \cventry so the second argument is not printed in italics
\xpatchcmd{\cventry}{\itshape#3}{#3}{}{}


% personal data
\name{First}{Last}
\address{12345 One Street, Sometown}{}{}
\phone[mobile]{(999)-555-5555}
\email{[email protected]}

\begin{document}
\makecvtitle

\cventry{}
  {Masters in Theoretical Physics}
  {University of Sussex}
  {2014 -- current}
  {}
  {1st year result - 80 per cent (first class classification)}
  {}{}

\end{document}

textcomp包避免了虚假警告;xpatch是必需的\xpatchcmd。还请注意我认为最好输入数据的方式\cventry

enter image description here

相关内容