I'm about to send off my application, one last edit and ... TeXstudio complains about an error in the code:

Undefined control sequence \makelettertitle

This is really strange since a few days ago, everything worked fine. I browsed the forum and found similar problems, especially this one: There is no line here to end \makelettertitle error in moderncv

Apparently the control sequence is very sensitive with regard to the definition of a recipient. But as you can see, I've got a recipient. Here's my code:

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic}                   
\moderncvcolor{blue}                   
\nopagenumbers{}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[scale=0.75]{geometry}
\usepackage{pdfpages}

% personal data
\name{Lars}{Klein}

\address{***str. ***}{***}{*** \medskip}
\phone[mobile]{***}
\phone[fixed]{***}
\email{***}

\begin{document}

\recipient{Bayer AG}{recipient address}
\date{\today}
\opening{Dear Madam or Sir,}
\closing{Sincerely, \vspace{0,3cm}  \vspace{-1,0cm}}
\enclosure[Appendices]{CV, Performance Record, Proof of Enrollment}          
\makelettertitle


% application text, personal

\makeletterclosing

\pagebreak

% #################################
% Lebenslauf......................

\makecvtitle

% cventries and cvitems, personal stuff

\includepdf[pages=1]{rwth-leistungen.pdf}
\includepdf[pages=1]{enrollment.pdf}

\clearpage

\end{document}

A few days ago, on the same machine, in the same editor this code compiled just fine. I'm sure that I haven't changed anything. The curious part is: It still compiles (with the error message) and doesn't list Bayer as the recipient, just the address "recipient address". This indicates to me, that something is wrong with my recipient setup and \makelettertitle has the same problem as in the linked question: empty recipient. But no matter what I enter as the recipient, the problem persists.

Something else: If I enter this code into the online editor ShareLatex, it compiles without any problems. The exact code pasted in this question, copied one-to-one into ShareLatex and my local TexStudio fails locally, compiles fine online. This could mean that my TexStudio installation is somehow broken. I'm using TexLive as a distro on Windows 10 64bit.

UPDATE:

since I'm tracking all my work-related documents with git, I could just revert to the state of a few days ago. Luckily the repository also contains the pdf (no criticism please, I know I'm not supposed to commit binaries). Now I can see the exact state of my tex file and the pdf that was created. The pdf contains the recipient name "Bayer" and "Leverkusen" as address. That's correct. If I open up the tex file in TexStudio the compiler error persists. The pdf is overwritten and the recipient name vanishes: No more "Bayer" in the pdf.

Apparently I broke my local latex in a very strange way. I didn't install any updates and the project is really absolutely unchanged, thanks to git.

And by now I've also tried TexMaker, same problem.

UPDATE

I removed the pdf references and compiled again, same error. The complete log output is on pastebin: http://pastebin.com/xHhmfaty

Currently I'm installing TexLive again, just to be sure. The installation takes ages. I'm surprised that TexStudio could invoke latex at all. After the installation finishes, I'll update the logs.

  • it shouldn't depend on the editor. It would help, if you gave the complete error message (in TeXstudio, click on that "Log" button in the bottom panel). If I uncomment the two included PDF files, it compiles with just warnings and the Bayer AG above the address (using TeXstudio and a rather old TeX Live) – riddleculous Apr 15 '16 at 11:10
  • You're right, it doesn't depend on the editor (locally) TexMaker has the same problem. I'm reinstalling TexLive. Nevertheless I could start the compilation process - with the same error messages. Rather surprised that it found latex even while installing. The logs are on pastebin. Once the installation is complete I'll update them – lhk Apr 15 '16 at 11:24
up vote 0 down vote accepted

I have reinstalled TexLive and the problem is gone.

It seems like this latex distribution is rather unstable. I didn't install any updates, not for TexLive and not for TexStudio or Windows. I'm not aware of any change to my system setup. And yet the very same code that compiled a few days ago is broken today. I would describe myself as a power user, normally I know what I'm doing. But the behaviour of TexLive dazzles me. For important data I will no longer use it. Sometimes the deadlines are close and then I need to understand what my software does.

  • never had such problems (but I have used TeX Live on Windows only recently; normally I use it with Ubuntu). What are you using then? Is MikTeX more stable? I tried to install it once but failed, so I chose TeX Live since I already know it. – riddleculous Apr 15 '16 at 14:25
  • So far I've been using TexLive, I'll probably switch to MikTex after this experience. – lhk Apr 19 '16 at 9:17
  • TeX Live is very stable and doesn't do any mambo jumbo. You probably messed up soething without even noticing it. The same will happen with MikTeX. – Johannes_B May 3 '16 at 7:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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