[Tex/LaTex] scrlttr2 – set nextfoot set to same as firstfoot

header-footerscrlttr2

I am tryint to get the same footer on all pages as the first page in scrlttr2. After some googling I came up with this code:

\documentclass{scrlttr2}
\begin{document}

\firstfoot{\footnotesize%
    \rule[3pt]{\textwidth}{.4pt} \\
    \begin{tabular}[t]{l@{}}% 
        Super Man\\
        Super Straße 30\\
        12345 Super Town
    \end{tabular}%
    \hfill
    \begin{tabular}[t]{l@{}}%
        Telefon: +49123456789\\
        super.man@gmail.com\\
    \end{tabular}%
        \hfill
        \begin{tabular}[t]{l@{}}%
            Bankverbindung: \\
            IBAN: DEXX XXXX XXXX XXXX XX\\
            BIC: XXXXXXXXXXXXX
        \end{tabular}%
}%
\addtokomafont{pagefoot}{\normalfont}
\pagestyle{headings}
\nextfoot{\usekomavar{firstfoot}}

\begin{letter}{Addr}
\opening{}
% You have to fill enough text to get to the second page
\closing{}
\end{letter}
\end{document}

You have to fill the comment with lorem ispum or something else to generate a second page!

But I have the following problems:

  1. \pagestyle{headings} also inserts the headers on the next page. I do not want that!
  2. The footer on the next page is not rendered correctly. It looks like this:

Wrong footer

while on the first page it looks like this:

Good Footer

Why?

Best Answer

To remove the header on the next pages use

\setkomavar{nexthead}{}

For the second problem use a \parbox inside firstfoot

\setkomavar{firstfoot}{\usekomafont{pageheadfoot}\usekomafont{pagefoot}%
    \parbox[t]{\textwidth}{%
        \rule[3pt]{\linewidth}{.4pt} \\
        \begin{tabular}[t]{l@{}}% 
            Super Man\\
            Super Straße 30\\
            12345 Super Town
        \end{tabular}%
        \hfill
        \begin{tabular}[t]{l@{}}%
            Telefon: +49123456789\\
            super.man@gmail.com\\
        \end{tabular}%
        \hfill
        \begin{tabular}[t]{l@{}}%
            Bankverbindung: \\
            IBAN: DEXX XXXX XXXX XXXX XX\\
            BIC: XXXXXXXXXXXXX
        \end{tabular}%
    }%
}%

Note that firstfoot is a variable too and command \firstfoot is depreciated.

But the footer will still have a different position and width on the two pages:

enter image description here


Pagestyle plain with package scrlayer-scrpage

I would load package scrlayer-scrpage and use a plain page style on all pages.

The following examples uses the normal plain style. Only the footsepline is a bit shifted upwards.

\documentclass[
    firstfoot=false,%<- no first foot
    footheight=48pt
]{scrlttr2}
\usepackage{blindtext}% dummy text

\usepackage[footsepline,plainfootsepline]{scrlayer-scrpage}
\ModifyLayer[
  addvoffset=-1ex
]{plain.scrheadings.foot.above.line}% shift the footsepline up
\addtokomafont{pagefoot}{\normalfont\footnotesize}
\clearpairofpagestyles
\cfoot*{
    \begin{tabular}[t]{l@{}}% 
        Super Man\\
        Super Straße 30\\
        12345 Super Town
    \end{tabular}%
    \hfill
    \begin{tabular}[t]{l@{}}%
        Telefon: +49123456789\\
        super.man@gmail.com\\
    \end{tabular}%
    \hfill
    \begin{tabular}[t]{l@{}}%
        Bankverbindung: \\
        IBAN: DEXX XXXX XXXX XXXX XX\\
        BIC: XXXXXXXXXXXXX
    \end{tabular}%
}

\pagestyle{plain}
\usepackage{xpatch}
\xapptocmd\opening{\thispagestyle{plain}}{}{}% <- first pages will have pagestyle plain too

\begin{document}
\setkomavar{fromname}{Name}
\setkomavar{firsthead}{It is still possible to set a firsthead.}% <- firsthead still works

\begin{letter}{Addr}
\opening{}
\Blindtext
\closing{}
\end{letter}
\end{document}

enter image description here

But you can also change the vertical position and the width of the footer to your needs. Here is an example similar to the normal firstfoot settings.

\documentclass[
    firstfoot=false,%<- no first foot
    footheight=48pt
]{scrlttr2}
\usepackage{blindtext}% dummy text

\usepackage[footsepline,plainfootsepline]{scrlayer-scrpage}
\KOMAoptions{footwidth=\useplength{firstfootwidth}}
\ForEachLayerOfPageStyle*{plain.scrheadings}{%
  \ifstrstart{#1}{plain.scrheadings.foot}{%
    \ModifyLayer[
      voffset={\useplength{firstfootvpos}-1em}
    ]{#1}
  }{}
}% shift the footer down
\ModifyLayer[
  addvoffset=-1ex
]{plain.scrheadings.foot.above.line}% shift the footsepline up
\addtokomafont{pagefoot}{\normalfont\footnotesize}
\clearpairofpagestyles
\cfoot*{
    \begin{tabular}[t]{l@{}}% 
        Super Man\\
        Super Straße 30\\
        12345 Super Town
    \end{tabular}%
    \hfill
    \begin{tabular}[t]{l@{}}%
        Telefon: +49123456789\\
        super.man@gmail.com\\
    \end{tabular}%
    \hfill
    \begin{tabular}[t]{l@{}}%
        Bankverbindung: \\
        IBAN: DEXX XXXX XXXX XXXX XX\\
        BIC: XXXXXXXXXXXXX
    \end{tabular}%
}

\pagestyle{plain}
\usepackage{xpatch}
\xapptocmd\opening{\thispagestyle{plain}}{}{}% <- first pages will have pagestyle plain too

\begin{document}
\setkomavar{fromname}{Name}
\setkomavar{firsthead}{It is still possible to set a firsthead.}% <- firsthead still works

\begin{letter}{Addr}
\opening{}
\Blindtext
\closing{}
\end{letter}
\end{document}

enter image description here