[Tex/LaTex] Errors in cventry

errorsmoderncv

I run the following Latex code (I am writing a CV using moderncv):

\documentclass[11pt, a4paper, sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor {black}
\renewcommand{\familydefault}{\sfdefault}
\nopagenumbers{}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\firstname{a}
\familyname{b}
\address{address1}{address2}
\mobile {xxx}
\photo[64 pt][0.4pt]{picture.jpg}
\begin{document}
\maketitle
\section{Education}
\cventry{entry1}{entry2} {entry3} {\textit{entry4}}{entry5}
\cventry{entry1}{entry2}{entry3}{entry4}{entry5}{}
\endcsname
\end{document}

But this way I get the following list of errors:

! Argument of \\cventry has an extra }.
! Paragraph ended before \\cventry was complete.
! Extra }, or forgotten \endgroup.
! Extra }, or forgotten \endgroup
! Misplaced \crcr. \endarray ->\crcr \egroup \egroup \gdef \@preamble {}\CT@end l.18 \cventry
! Extra }, or forgotten \endgroup.
! Extra }, or forgotten \endgroup. Extra }, or forgotten $. <recently read> \egroup l.18 \cventry
! LaTeX Error: \begin{minipage} on input line 18 ended by \end{tabular}.
! Missing $ inserted.

I tried both to add and to remove curvy brackets from this line but it seems this is not the reason. Also, I saw other scripts and it was not required me to insert anything at the end of the \cventry to end it. How can I solve the problem?

Best Answer

Because you need a 6th argument in the first(!) call of \cventry the second one is correct

\cventry{entry1}{entry2} {entry3} {\textit{entry4}}{entry5}{entry6!}

I also needed to remove \endcsname to get your code to compile.

Related Question