I have taken the simple example from the KOMA script guide from page 166-167 (pdf). I now wish to introduce a company name in the line before (or after) my name. I would naively do so by changing
\setkomavar{fromname}{John Public}
to
\setkomavar{fromname}{Company Name\\John Public}
However, this breaks compilation. The error message is
! Undefined control sequence.
\@gnewline ...\@nolnerr \else \unskip \reserved@e
{\reserved@f #1}\nobreak \...
l.24 \closing{Expecting an invitation}
Consequently, removing the \closing{}
command correctly renders the document, but, obviously, without a closing. Note, that I am not actually concerned about the closing, I just want it to work as usual.
Questions:
- How do I properly add a company name to the
from
variables, i.e., the return address? - What causes this weird error?
Full example:
\documentclass[foldmarks=true,foldmarks=blmtP,
fromalign=false,fromrule=afteraddress,
fromphone,fromemail,
version=last]{scrlttr2}
\usepackage[english]{babel}
\begin{document}
%\setkomavar{fromname}{John Public}
\setkomavar{fromname}{Company Name\\John Public}
\setkomavar{fromaddress}{Valley 2\\
54321 Public-Village}
\setkomavar{fromphone}{0\,12\,34~56\,78}
\setkomavar{fromemail}{[email protected]}
\begin{letter}{%
Joana Public\\
Hillside 1\\
12345 Public-City%
}
\opening{Dear chairman,}
the last general meeting was about one year ago.
I want to remind you, that the constitution of our
club advises you to make a general meeting every
six month. Because of this I expect the executive
board to detain such a meeting immediately.
\closing{Expecting an invitation}
\ps PS: I hope you accept this as an friendly
demand note.
\setkomavar*{enclseparator}{Enclosure}
\encl{Compendium of the constitution with the
general meeting paragraphs.}
\cc{executive board\\all members}
\end{letter}
\end{document}
\setkomavar{signature}{Company Name\\john Public}
\linebreak
.