[Tex/LaTex] Remove some commas from “ModernCV”

moderncvpunctuation

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.

Best Answer

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}
Related Question