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?

0

2 Answers 2

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.

1
  • Now obsolete and unsupported. Commented Mar 23, 2022 at 19:07
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}{[email protected]}
\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .