0

You can see in this picture (made by ModernCV ) that the commas appear automatically between fields

enter image description here

I would like to remove some commas without changing the definition of this macro.

2 Answers 2

1

The commas are hard-coded within the \cventry macro; here's the definition (from 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&#7&%
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

If arguments are not left blank, commas are inserted before displaying another argument. You should either change this definition within your preamble, or fool \cventry by formatting components manually within other arguments:

enter image description here

\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

Use the following command.

\usepackage{xpatch}
\xpatchcmd\cventry{,}{}{}{}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .