答案1
逗号在\cventry
宏中是硬编码的;这是定义(来自moderncvbodyi.sty
):
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
如果参数没有留空,则在显示另一个参数之前会插入逗号。您应该在序言中更改此定义,或者\cventry
通过手动格式化其他参数中的组件来欺骗:
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % default
\cventry{year--year}{Degree {\mdseries\itshape Institution}}{}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution \textup{City}}{}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City \textit{Grade}}{}{Description}
答案2
使用以下命令。
\usepackage{xpatch}
\xpatchcmd\cventry{,}{}{}{}