2

This is my code and it automatically puts a colon after the "Intern - Technology" bit, how do I override this and get rid of it?

\cvitemwithcomment{\normalfont{HSBC, London,} \textbf{Intern - Technology Division}}{}{\normalfont{Jun--August 2015}}
\begin{itemize}
\item 
\vspace{2mm}
\end{itemize}

this is the class I am using:

\documentclass[10pt,a4paper,sans]{moderncv} 
\moderncvstyle{banking} 
\moderncvcolor{black} 
\usepackage[utf8]{inputenc} 
\usepackage[scale=0.8]{geometry}
  • Please share a link to the template in use. – Johannes_B Jul 17 '16 at 16:30
  • It is also important to know which style you are using. – Johannes_B Jul 17 '16 at 16:35
  • \moderncvstyle{banking} \usepackage{xpatch} \xpatchcmd{\cvitemwithcomment}{:}{}{}{} \xpatchcmd{\cvitemwithcomment}{:}{}{}{} – Johannes_B Jul 17 '16 at 16:43
  • sorry this is the style i am using \documentclass[10pt,a4paper,sans]{moderncv} \moderncvstyle{banking} \moderncvcolor{black} \usepackage[utf8]{inputenc} \usepackage[scale=0.8]{geometry} – Hannah Turner Jul 17 '16 at 17:25
  • Please add it to the question, that will pop it on top of the main site and more users see your question. – Johannes_B Jul 17 '16 at 17:27
1

Without going as far as redefining \cvitemwithcomment, you can capture the : and remove it:

enter image description here

\documentclass{moderncv}

\moderncvstyle{banking} 

\firstname{First}
\lastname{Lastname}

\let\oldcvitemwithcomment\cvitemwithcomment
\let\oldhintstyle\hintstyle
\renewcommand{\cvitemwithcomment}[4]{{%
  \renewcommand*{\hintstyle}[2]{\oldhintstyle{##1}}%
  \oldcvitemwithcomment{#1}{#2}{#3}{#4}%
}}

\begin{document}

\cvitemwithcomment
  {{\normalfont HSBC, London,} \textbf{Intern - Technology Division}}
  {}
  {{\normalfont Jun--August 2015}}

\end{document}

Here is the original definition of \cvitemwithcomment where the insertion of : is visible in the first line:

\renewcommand*{\cvitemwithcomment}[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}}

you can change this to suit your needs and adding the resulting code your preamble after loading the style of your choice.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.