Custom KOMA-Script Letter 1.1

Over the last couple of KOMA-Script releases, I noticed that my custom letter format for this style package had changed its appearance. Specifically, the second page’s header and footer had moved from the margins into the page, taking up far too much space. I opened a (German) bug report on the KOMA-Script forum, including sample LaTeX and PDF documents.

Happily, I quickly got a reply from user Elke with the correct solution. As it turns out, the new behavior is intentional and explained in the KOMA-Script guide. Here’s the relevant excerpt at the bottom of page 39 in scrguien.pdf (the equivalent passage in the German guide scrguide.pdf is on page 44).

The decision is easy when text and header or footer are separated from the text body by a line. This will give a “closed” appearance and header or footer become part of the text body. Remember: It is irrelevant that the line improves the optical separation of text and header or footer; only the appearance when viewed out of focus is important.

This refers to the switches headinclude and footinclude which control whether the header and footer area, respectively, are considered part of the document margins or of the text body. By default these switches are off so that header and footer don’t intrude on the text body. But as soon as you enable a separating line, the switches are toggled automatically and pull the header/footer into the text body!

I certainly don’t agree with the KOMA-Script guide’s “easy decision” in this respect. I would expect that pulling marginal stuff into the text body is either based on total height or under exclusively manual control, not triggered automatically by a thin visual separation. Be that as it may, it’s easy to disable this undesirable behavior once you’re aware of it:

  headsepline, footsepline,
  headinclude=false, footinclude=false

The explicit \recalctypearea is required to update the page layout after the switches have been manually disabled. I updated the style file in accordingly and recreated the sample output, KomaLetterSample.pdf. Note that there appears to be a genuine bug in KOMA-Script 1766 related to this behavior where only footsepline but not headsepline triggers the layout alteration. I expect this will be fixed in a future release.

While I was at it, I also updated the sample bank connection in the letter head to the new European BIC/IBAN numbers, and added a variety of style adjustments such as increased indentation from my general LaTeX style file. Keep or remove them as you like.

Leave a Reply