
답변1
귀하가 표시하고 있는 항목은 을 사용하여 생성되므로 \cventry
이 매크로의 정의를 변경하고 싶습니다. 에 정의되어 있습니다 moderncvstyleclassic.sty
. 내가 한 일은 그것을 서문에 그대로 복사하고 원하지 않는 쉼표를 제거한 것뿐입니다. (MWE에서는 실제로 변경 사항을 알아볼 수 있도록 해당 행을 복사하고 원본을 주석 처리했습니다.
\documentclass{moderncv}
\moderncvstyle{casual}
%%%
% the following definition is from the file moderncvstyleclassic.sty
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
% \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% I changed this line (with comma) ...
\ifthenelse{\equal{#4}{}}{}{ {\slshape#4}}% ... into this one (without comma).
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
%%%
\firstname{John}
\familyname{Doe}
\begin{document}
\section{Education}
\cventry{December 2012}{Master of Science in Chocolatology}{University of Candyland}{Sugartown}{A+ with Golden Gummy Bear}{I am the chocolate-man.}
\end{document}
답변2
전체 명령을 직접 재정의하는 대신 다음을 사용하는 것도 고려해 보세요 xpatch
.
\usepackage{xpatch}
\xpatchcmd\cventry{,}{}{}{}
이 줄은 매크로 텍스트의 첫 번째 항목을 ,
빈 문자열로 대체합니다. 즉, 이를 제거합니다.
답변3
당연한 설명이지만 쉼표가 있는 것과 없는 것 사이를 전환할 수 있기를 원하는 경우 \cventrynocomma
다음과 같이 새 명령을 정의할 수 있습니다.
\newcommand*{\cventrynocomma}[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}}
답변4
moderncvstyleclassic.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에서 자동 생성된 쉼표와 점을 제거합니다.