6

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

  • You get your code to look like code by having it indented 4 spaces. To accomplish this easily, highlight the block of code in your edit box, and click on the {} symbol above the edit box. – Steven B. Segletes Oct 8 '13 at 15:30
  • The only error I get is that the image pictures/picture is missing. If you have your photo, you should change pictures/picture into the file name of that photo. – egreg Oct 8 '13 at 15:42
  • I can see the picture without any problems. – Dilip Oct 8 '13 at 15:59
  • Soloution here: enter link description here – user101245 Mar 21 '16 at 21:17
8

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
  • Thanks a ton David. Can you also tell me if it is possible to get rid of the full stop at the end of name, address,..etc. – Dilip Oct 8 '13 at 15:50
  • @Dilip see update – David Carlisle Oct 8 '13 at 15:59
  • I have a similar problem again here \medskip \cventry{xx/xxx--xx/xx}{Master in xx}{Universit\"at xx}{xx}{\newline Gesamtnote: gut}{} \cvitem{Masterarbeit xx/xx - xx/xx}{{Titel der Masterarbeit ''xx''}\newline{Arbeitgeber: xx xx xx, xx, xx}\newline{Abteilung: xx xx and xx}} – Dilip Oct 27 '13 at 11:32

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.