2

How do I make the recipient and date optional in the ModernCV Cover Letter

Latex ModernCV Cover Letter

coverletter.tex

\documentclass[a4paper]{moderncv}

\moderncvstyle{banking} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{purple} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage[english]{babel}

\firstname {name}    % Your name
\lastname {Last name} % Your last name
\title {Title}              % Your title (optional)
\address{street and number}{post code and city} % Your current address
\mobile {number}    % Your mobile phone number
\phone {number}    % Your phone number
\email {email}          % Your email address
\homepage {link}    % Your website
\extrainfo {information} % Possible extra information e.g. website
\photo[64pt][0.4pt]{picture}  % Your photo (optional)
\quote {quote} % Life motto or something like that (optional)

\begin{document}

%-----       letter       ---------------------------------------------------------
% make recipient data optional
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}     % make the date optional
\opening{Dear Sir or Madam,}
\closing{Yours faithfully,}
\enclosure[Attached]{curriculum vit\ae{}}          % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus.

Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec velit. Vivamus dapibus varius blandit.

\makeletterclosing

\end{document}
1

You can redefine the way the title is constructed so that it avoids setting the recipient details and date. This way you can supply it (or not) and it won't be printed. All you need is the following in the preamble:

\makeatletter
\renewcommand{\makeletterhead}{%
  \recomputeletterlengths
  \makehead\par
  \raggedright
  \@opening\par
}
\makeatother

enter image description here

2
  • But what do you need to do if you want to include the recipient and/or the date? – Ishan Jul 5 '17 at 5:32
  • @Ishan: Just don't include the code that I added. If you want, one can create a macro (say) \insertrecipientanddate and \removerecipientanddate which will all you to switch between the two options. Perhaps? – Werner Jul 5 '17 at 5:36

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.