1

I am using scrlttr2 to write letters, and in particular add the attachements also provided in the envelope in the \encl{} closure.

However, since I add many many entries to the encl{} closure, it would need to continue on another page.

Unfortunately, this closure does not do so, leading to the effect, that entries are missing.

As far as I understand it, scrlttr2 is based upon letter and the documentation of the latter provides the option to allow pagebreaks according to page 13, where it says

After the \closing you can put arbitrary stuff, which is typeset with zero \parindent and no page breaking [..]
The only thing \ps needs to do is call \startbreaks, which allows page breaking again.
219 \newcommand*\ps{\par\startbreaks

My MWE looks like

\documentclass[%
    version=last,%
    parskip=half-,%
    subject=untitled,%
    pagenumber=off,%
    footsepline=off]%
{scrlttr2}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\begin{document}
    \renewcommand*\ps{\par\startbreaks}
    \setkomavar*{enclseparator}{Anlagen}
    \begin{letter}    {%
        Max Mustermann\\
        Vor dem Berg 1\\
        12345 Musterhausen}
        \opening{Dear Mr.,}
        please find attached the discussed documents.
        \closing{Kind regards,}
        \encl{%
            \lipsum[1-1]
            \newpage
            \lipsum[2-2]
        }
    \end{letter}
\end{document}
5
  • \encl is not the same as \ps. The \encl is a \parbox in scrlttr2 and also in letter. Therefore page breaks inside \encl are not supported. You can only make a page break before \encl, either using \newpage, \clearpage, \pagebreak or \startbreaks before \encl.
    – cabohah
    Nov 11, 2023 at 13:07
  • 1
    BTW: I don't think, that scrlttr2 is based a lot upon letter. It is very, very different. So the documentation of letter is not really relevant for scrlttr2. For scrlttr2 you should rely on the chapters about scrlttr2 and scrletter in the KOMA-Script manuals.
    – cabohah
    Nov 11, 2023 at 13:10
  • One more note: The definition of \ps in letter.cls is already \newcommand*\ps{\par\startbreaks}. So redefining it to exactly this definition would not change anything. And because \ps is not used automatically, you have to explicitly use it, to get an effect. BTW: the \ps of scrlttr2 also contains \startbreaks.
    – cabohah
    Nov 11, 2023 at 13:18
  • Thank you very much for the responses. Bottom line: It is not possible to strech \encl{} across two pages? Nov 11, 2023 at 19:19
  • I've already answered this in my first comment.
    – cabohah
    Nov 12, 2023 at 9:37

1 Answer 1

1

There are several errors in your premise. Firstly, the letter class documentation is not applicable to scrlttr2, since scrlttr2 differs a lot and shares less code with letter. So it is recommended to refer to the scrlttr2 documentation instead. Additionally, if you do not utilize \ps, then redefining it would be pointless. Moreover, the original definition of \ps in KOMA-Script already includes \startbreaks. Redefining \ps would not enable \startbreaks. It would only eliminate the additional code that KOMA-Script uses and alter the documented behavior of the command.

But the primary error is because of the fact that \ps differs from \encl in both meaning and implementation. The letter class's version of \encl is already defined using \parbox. LaTeX utilizes a vertical TeX box, such as \vbox, \vcenter, or \vtop, to create a \parbox. This implies that it is impossible to have page breaks inside a \parbox. So, the letter class does not currently support page breaks within the argument of \encl. Testing this is easy:

\documentclass{letter}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}% Note: No longer needed since LaTeX 2018-04-01.
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\begin{document}
    \renewcommand*\ps{\par\startbreaks}% Note: Does not do anything in the example
    \begin{letter}    {%
        Max Mustermann\\
        Vor dem Berg 1\\
        12345 Musterhausen}
        \opening{Dear Mr.,}
        please find attached the discussed documents.
        \closing{Kind regards,}
        \encl{%
            \lipsum
        }
    \end{letter}
\end{document}

And indeed, in this aspect, the scrltt2 is quite similar to the letter class. Class scrlttr2 prints the \encl argument in a \parbox. Due to this, it also does not allow for page breaks within the \encl argument. The only possible action is to insert \startbreaks prior to \encl so that page breaks can occur before the argument is printed.

An alternative could be to forego the use of \encl for the enclosures and opt for a list instead:

\documentclass[%
    version=last,%
    parskip=half-,%
    subject=untitled,%
    pagenumber=off,%
    footsepline=off]%
{scrlttr2}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}% Note: Not needed since LaTeX 2018-04-01.
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\begin{document}
    \begin{letter}    {%
        Max Mustermann\\
        Vor dem Berg 1\\
        12345 Musterhausen}
        \opening{Dear Mr.,}
        please find attached the discussed documents.
        \closing{Kind regards,}
        \startbreaks
        \begin{labeling}{\enclname:}
          \item[\enclname:] 
            \lipsum[1-1]
            \newpage
            \lipsum[2-2]
        \end{labeling}
    \end{letter}
\end{document}

However, I would recommend to not use such long enclosures. And I would also not recommend to use several paragraphs inside the enclosure.

BTW: If just some lines are missing at the first page, an alternative would be to use a letter without page footer using option firstfoot=false and enlarge the first page using option enlargefirstpage.

You must log in to answer this question.

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