[Tex/LaTex] moderncv \cventry remove dots at the end of line

moderncv

Im using the template for moderncv, and i want to remove the dots at the end of the line of \cventry, can someone recode the command for me?

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\name{John}{Doe}
\begin{document}
\makecvtitle
\section{Education}
\cventry{1990--2015}{Wisdom}{School of life}{Earth}{}{Description}
\end{document}

Best Answer

In order to change this, you will need to change how \cventry is defined.

\cventry is defined as:

\renewcommand*{\cventry}[7][.25em]{%
  \savebox{\cventryyearbox}{%
    \hspace*{2\separatorcolumnwidth}%
    \hintstyle{#2}}%
  \setlength{\cventrytitleboxwidth}{\widthof{\usebox{\cventryyearbox}}}%
  \setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}%
  \begin{minipage}{\maincolumnwidth}%
    \parbox[t]{\cventrytitleboxwidth}{%
      \strut%
      {\bfseries#3}%
      \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
      \ifthenelse{\equal{#5}{}}{}{, #5}%
      \ifthenelse{\equal{#6}{}}{}{, #6}%
      .\strut}%
    \usebox{\cventryyearbox}%
  \end{minipage}%
  \ifx&#7&%
    \else{%
      \newline{}%
      \begin{minipage}[t]{\maincolumnwidth}%
        \small%
        #7%
      \end{minipage}}\fi%
  \par\addvspace{#1}}

You can use the package xpatch to patch this command in the preamble of your document. If you look at the definition above, you will see that the relevant thing to change is the line that says .\strut}%.

xpatch provides the command \xpatchcmd. The syntax for the command is:

\xpatchcmd{⟨command⟩}{⟨search⟩}{⟨replace⟩}{⟨success⟩}{⟨failure⟩}

MWE

\documentclass{moderncv}

\moderncvstyle{casual}
\name{John}{Doe}

\usepackage{xpatch}
\xpatchcmd{\cventry}{.\strut}{\strut}{}{}

\begin{document}
\makecvtitle
\section{Education}
\cventry{1990--2015}{Wisdom}{School of life}{Earth}{}{Description}
\end{document}

enter image description here