[Tex/LaTex] What are the miminal required environments for a KOMA-Script scrlttr2

examplesinvoicekoma-script

I want to use the KOMA-Script letter2 class for creating client invoices. I've read the user guide (version 2017-08-08) and searched the web without finding the answer.

The only way I can get the draft to compile with pdflatex (within LyX) is by including the environments such as opening, closing, signature, and a couple of others. In the preamble I include the invoice2 package which has 'customer' and 'invoice no.' environments and I want to learn how to use the invoice2 package for invoicing and sending statements. So I want to find the fewest required environments to produce an invoice using the scrlttr2 class. Are there examples available?

Best Answer

There are a lot of examples for letters with scrlttr2 in the KOMA-Script manual, starting with the most simple in section 4.7, "General Structure of Letter Documents":

\documentclass[version=last]{scrlttr2}
\usepackage[english]{babel}
\begin{document}
\begin{letter}{Joana Public\\
Hillside 1\\
12345 Public-City}
\opening{Dear chairman,}
\end{letter}
\end{document}

simple letter

(\opening is needed to get the elements of the first letter page, like letter head, addressee and fold marks); until a more complex one in section 4.20, "Closing":

\documentclass[foldmarks=true,foldmarks=blmtP,
fromphone,fromemail,fromlogo,
subject=titled,
version=last]{scrlttr2}
\usepackage[english]{babel}
\usepackage{graphics}
\begin{document}
\setkomavar{fromname}{John Public}
\setkomavar{signature}{John Public\\
(former chairman)}
\renewcommand*{\raggedsignature}{\raggedright}
\setkomavar{fromaddress}{Valley 2\\
54321 Public-Village}
\setkomavar{fromphone}{0\,12\,34~56\,78}
\setkomavar{fromemail}{Peter@Public.invalid}
\setkomavar{fromlogo}{\includegraphics{musterlogo}}
\setkomavar{location}{\raggedright
Club nember no.~4711\\
since 11.09.2001\\
chairman 2003--2005}
\setkomavar{date}{29th February 2011}
\setkomavar{place}{Public-Village}
\setkomavar{subject}{Missing general meeting}
\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}

more complex letter

For individual designs you can find additional examples in the KOMA-Script documentation project. There are not only German examples but also some in English like: Reproducing the official header of the Washington State University.

The German KOMA-Script book has additional, interesting examples for "modern letters" (appendix/Anhang D). One of it results in:

modern letter

If you want to use, class scrlttr2 (or package scrletter) for invoices, you should start with a letter, add, e.g., \setkomavar{title}{Invoice} and think about the reference line fields you need, e.g., customer. We currently do not know, what you need.

Related Question