如何从单个 cvitemwithcomment 中删除冒号

如何从单个 cvitemwithcomment 中删除冒号

我之前看过这个帖子-如何从 cvitemwithcomment 中删除冒号?,但它涉及通过改变序言中的 cvitemwithcomment 来改变整个文档中发生的事情。

我可以做些什么来单独在某个部分/小节中改变它?

梅威瑟:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage{parskip}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

\name{Jane}{Doe}
\address{1st street, 123}{1234-123}{Place}

\begin{document}

\makecvtitle

\section{Section 1}
\subsection{Language skills}
\cvitemwithcomment{Portuguese}{Mother tongue}{}
\cvitemwithcomment{English}{Good}{I want to keep the colons here}
\cvitemwithcomment{French}{Sufficient}{in this subsection}

\subsection{Lectures}
\cvitemwithcomment[1em]{\parbox{0.2\textwidth}{It doesn't make sense to me to keep}}{\parbox{0.4\textwidth}{the colons here (2017)}}{in this part}
\end{document}

答案1

只需定义您自己的非冒号版本\cvitemwithcomment,例如\cvitemwithcommentnocolonmoderncv班级没有提供轻松删除此组件的选项:

\newcommand*{\cvitemwithcommentnocolon}[4][.25em]{%
  \savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2} }#3}%
  \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
  \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
  \begin{minipage}[t]{\cvitemwithcommentmainlength}\usebox{\cvitemwithcommentmainbox}\end{minipage}%
  \hfill% fill of \separatorcolumnwidth
  \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}%
  \par\addvspace{#1}}

相关内容