8

It seems like by default the scrlttr2 class doesn't support sectioning, that is the command \section or \paragraph returns errors.

How can one add sectioning support to a latter basing on scrlttr2?

Dror
  • 22,613

2 Answers2

5

One solution is hinted in this answer. In particular, download the file sectionslco.zip and unzip it to the directory containing the letter. Finally, add the class option sections. Now you can use all sectioning macros, e.g. \section, as usual.

Dror
  • 22,613
3

I would recommend using an scrartcl document together with the scrletter package which comes with Koma-Script for a few years now. It allows you to put a letter environment into any document, effectively enabling sections inside and after your main letter.

Example:

\documentclass{scrartcl}
\usepackage{scrletter} % You can put most scrlttr2 options here.
\usepackage{lipsum}
\begin{document}
\date{\today}
\setkomavar{fromname}{My Name}
\setkomavar{fromaddress}{My address\\My City}
\setkomavar{fromphone}{Phone Number}
\setkomavar{fromemail}{mail@example.com}
\setkomavar{place}{City}
\setkomavar{signature}{My name again}

\setkomavar{subject}{Hello World}
\begin{letter}[fontsize=14pt]{%
    To:\\ You
}
\opening{Hello there!}

Hello dear world.

\section{Oh wow!}

This is another section.

\closing{CU later}
\ps{PS: Forgot anything?}
\encl{A bottle of beer}
\end{letter}

\tableofcontents % Even hyperrefs into the main letter work.
\section{Another section}
With content.
\end{document}
quazgar
  • 1,273