[Tex/LaTex] moderncv: unwanted punctuation

moderncvpunctuation

I am trying to prepare my resume using LaTeX but everytime after I compile I see an unnecessary '.' after the sentence. The code snippet looks like this:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% "ModernCV" CV and Cover Letter
% LaTeX Template
% Version 1.1 (9/12/12)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Xavier Danaux (xdanaux@gmail.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Important note:
% This template requires the moderncv.cls and .sty files to be in the same 
% directory as this .tex file. These files provide the resume style and themes 
% used for structuring the document.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[10pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\usepackage[scale=0.85]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{Dilip} % Your first name
\familyname{Rachuri} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Lebenslauf}
\address{xx}{xxxx, xx}
\mobile{(xx) xx}
\email{xx.xxx}

%\homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith} % The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example

\photo[70pt][0.4pt]{pictures/picture} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)
%\quote{"A witty and playful quotation" - John Smith}

%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle % Print the CV title

%----------------------------------------------------------------------------------------
%   EDUCATION SECTION
%----------------------------------------------------------------------------------------
\section{Angaben zur Person}
\medskip
\cventry{Name}{xxx}{}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{Adresse}{xxx}{xx, xx}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{Telefon}{xx-xx}{}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{E-Mail}{xx.xx@xx.com}{}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{Staatsh\"origskeit}{xx}{}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{Geburtsdatum}{x xx}{}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{Geschlecht}{xx}{}{}{\textit{}}{}  % Arguments not required can be left empty
\cventry{Gew\"unschtes Berufsfeld}{Ingenieur}{}{}{\textit{}}{}  % Arguments not required can be left empty
\end{document}

The failure can be replicated if the same code above is compiled. Can someone help me?

Thank You
Dilip

Best Answer

Use

{}

not

{\textit{}}

The class detects empty arguments and omits the comma and space but the \textit makes it non-empty.

The . is added directly by \cventry but you could redefine it after setting up the cv theme:

\makeatletter
\expandafter\def\csname\string\cventry\endcsname[#1]#2#3#4#5#6#7{\cvitem [#1]{#2}{{\bfseries #3}\ifthenelse {\equal 
{#4}{}}{}{, {\slshape #4}}\ifthenelse {\equal {#5}{}}{}{, #5}%
\ifthenelse {\equal {#6}{}}{}{, #6}%%%%%%%%%%%%%%%%%%%%%.
\strut \ifx &#7&\else {\newline {}\begin {minipage}[t]{\linewidth }\small #7\end {minipage}}\fi}}
\makeatother