Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using Texmaker to update my CV, but i am having problem with the \extrainfo. I am using moderncv documentclass and moderncvstyle {classic}. I want extrainfo to appear in my curriculum but not in my cover letter. Latex Template code is given below:

\documentclass[11pt,a4paper,sans]{moderncv}
\pagestyle{fancy}
\usepackage{moderntimeline}
\moderncvstyle{classic}
\moderncvcolor{green}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{Resumé title} 
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org} 
\homepage{www.johndoe.com}
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}
\begin{document}
\makecvtitle

Then code goes on with section, subsections for CV until we arrive at the coverleter part

    \recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
    \date{January 01, 1984}
    \opening{Dear Sir or Madam,}
    \closing{Yours faithfully,}
    \enclosure[Attached]{curriculum vit\ae{}}  
    \makelettertitle
    \makeletterclosing
    \end{document}

What i get in Cv and cover letter is shown below: enter image description here

Same 'Additional information' appear in the cover letter as:enter image description here

Now I want to keep this Additional information in my Cv but want to remove it from the cover letter. Any help????

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Instead of patching \makelettertitle, you can just set the "additional information" macro (\@extrainfo) to \relax:

\makeatletter
\let\@extrainfo\relax% Remove \@extrainfo
\makeatother
\makelettertitle
share|improve this answer
    
Thanks It also works! –  Umz Nov 16 '13 at 21:07

add

\patchcmd\makelettertitle{\makenewline\@extrainfo}{}{}{}

after

\moderncvstyle{classic}

In more details, what this does is to edit \makelettertitle from moderncvstyleclassic.sty removing the call to \@extrainfo:

\renewcommand*{\makelettertitle}{%
[...] 
     \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}} %% patchcmd edits this line removing the \@extrainfo command that is responsible for inserting the "additional information" inside the letter title
[...]

the etoolbox package (which allows you to use patchcmd) is already loaded by moderncv so you just need to use it.

share|improve this answer
    
Thanks a lot it worked ! –  Umz Nov 16 '13 at 20:39
    
Thanks again for detailed explanation ! –  Umz Nov 16 '13 at 20:52

It seems that the easiest way would be to add an empty \extrainfo{} before the command \makelettertitle. Thereby you would overwrite the previous information.

\documentclass[11pt,a4paper,sans]{moderncv}
\pagestyle{fancy}
\usepackage{moderntimeline}
\moderncvstyle{classic}
\moderncvcolor{green}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{Resumé title} 
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org} 
\homepage{www.johndoe.com}
\extrainfo{additional information}
%\photo[64pt][0.4pt]{picture}
\quote{Some quote}
\begin{document}
\makecvtitle
\clearpage
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully,}
\enclosure[Attached]{curriculum vit\ae{}}  
\extrainfo{}                    % <== that's the magic
\makelettertitle
\makeletterclosing
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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