I am writing a CV with cover letter using moderncv 2.0 and I would like the line with the recipient to be longer. This question is technically a duplicate of this one, but the given solution does not work for me. When I use


the output tells me:

[debug] tracing \patchcmd on input line 16
[debug] analyzing '\makelettertitle'
[debug] ++ control sequence is defined
[debug] ++ control sequence is a macro
[debug] ++ macro can be retokenized cleanly
[debug] -- search pattern not found in replacement text

But when I use renewcommand to rewrite the \makeletterhead command, I can change the size perfectly well. In the MWE I comment out the working part.


% Diese drei Pakete benötigen wir für die Umlaute, Deutsche Silbentrennung etc.
\moderncvtheme[black]{classic}         %alternativ: casual


% adjust the page margins



% \makeatletter
% \renewcommand*{\makeletterhead}{%
%   % recompute lengths (in case we are switching from letter to resume, or vice versa)
%   \recomputeletterlengths%
%   % sender contact info
%   \hfill%
%   \begin{minipage}{.5\textwidth}%
%     % optional detailed information
%     \if@details%
%       \raggedleft%
%       \addressfont\textcolor{color2}{%
%         {\bfseries\upshape\@firstname~\@lastname}\@firstdetailselementfalse%
%         % optional detailed information
%         \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
%           \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
%           \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
%         \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
%           \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
%         \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
%         \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
%         \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
%     \end{minipage}\\[1em]
%   % recipient block
%   \begin{minipage}[t]{.8\textwidth}      % original: .5
%     \raggedright%
%     \addressfont%
%     {\bfseries\upshape\@recipientname}\\%
%     \@recipientaddress%
%   \end{minipage}
%   % date
%   \hfill% US style
% %  \\[1em]% UK style
%   \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
%   % opening
%   \raggedright%
%   \@opening\\[1.5em]%
%   % ensure no extra spacing after \makelettertitle due to a possible blank line
% %  \ignorespacesafterend% not working
%   \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
% \makeatother


\address{Hauptstraße 123}{12345 Berlin}
\email{[email protected]}



%-----       letter       ---------------------------------------------------------
% recipient data
  {Super Universität Berlin, FB Superfachbereich und andere Wissenschaften}
  {Institut für Superduper\\
    Angewandte Mathematik und Gender Studies\\
    Frau Prof. Dr. Dr. Prof.\\
    Hauptstr. 456\\
    54321 Berlin}

\opening{Sehr geehrte Damen und Herren,}
\closing{Mit freundlichen Grüßen\newline}
\enclosure[im Anhang]{Lebenslauf, Leistungsübersicht, Immatrikulationsbescheinigung}



 % Local variables:
 % mode: latex
 % TeX-open-quote: "\"`"
 % TeX-close-quote: "\"'"
 % TeX-master: t
 % End:

I'm not sure whether it is important, but I'm using Emacs.app with AUCTeX on Mac OS X, German language and this is my first question on Stackexchange.

  • 1
    The message is telling you the reason: "-- search pattern not found in replacement text", so the text that you are searching to replace doesn't match any of the text in the definition. Aug 21, 2015 at 15:35
  • 1
    I left a comment to the linked answer: I believe that with the current version of moderncv one has to patch \makeletterhead instead of \makelettertitle.
    – egreg
    Aug 21, 2015 at 15:43
  • 2
    See this comment by the answerer: tex.stackexchange.com/questions/157146/… I think we can close this question as duplicate, now.
    – egreg
    Aug 21, 2015 at 15:48


Browse other questions tagged .