1

I have the following code:

\documentclass[DIN, pagenumber=footmiddle, parskip=half,
    fromalign=right,  % Align sender to the right
    fromphone=true, fromfax=false,
    fromrule=false]{scrlttr2}

\usepackage{ngerman}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{eurosym}

\LoadLetterOption{template}
\renewcommand*{\raggedsignature}{\raggedright} 

% file contains sender-address
\input{data.tex}


%===================================
\setkomavar{subject}[]{Angebot über die Entwicklung einer Smartphone-Anwendung}
\setkomavar{yourmail}[Ihre Angebots-Nr.]{2010122621}
\setkomavar{yourref}[Ihre Kundennummer]{262}
\setkomavar{date}[Datum]{24. Februar 2011}


\begin{document}

%===================================
% receiver
\begin{letter}{
    Max \& Mustermann Agency\\ 
    z.Hd. Herrn Mustermann\\ \ \\
    Musterstr. 12\\
    12345 Musterstadt
}

%===================================
\opening{Sehr geehrte Damen und Herren,}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tem 
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam 
et justo duo dolores et ea rebum. 

Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem 
ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tem invidunt ut 
labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo 
dolores et ea rebum. 

Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\\ 

\closing{Mit freundlichen Grüßen}

\setkomavar*{enclseparator}{Anlage} 
\encl{Angebotsausarbeitung}

\newpage


%===================================
\begin{longtable}{p{4cm}p{6.5cm}p{2cm}p{4cm}}
    Ihre Kundennummer   & 262 & Datum & 24. November 2010\\
    Ihre Angebots-Nr. & 2010122621 & Gültig bis & 31. Dezember 2010\\
\end{longtable}


%===================================
\begin{longtable}{p{2.5cm}p{5.5cm}p{1cm}p{1cm}p{2.5cm}p{2.5cm}}
    \hline  
    Ag.-Pos. & Bezeichnung & Menge & ME & Einzelpreis (exkl. MwSt.) & Gesamtpreis (exkl. MwSt.)\\
    \hline 

    \textbf{Allgemein}\\
    10 & At vero eos, kasd gubergren & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    20 & At vero eos, kasd gubergren  & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    \multicolumn{5}{r}{Zwischensumme Allgemein (exkl. MwSt.):} & 0,00 \euro{}\\
    \\

    \textbf{Design}\\
    30 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    40 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    50 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    60 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    \multicolumn{5}{r}{Zwischensumme iPhone (exkl. MwSt.):} & 0,00 \euro{}\\
    \\

    \textbf{Programmierung}\\
    70 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    80 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    90 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    100 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    110 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    120 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    130 & Sed diam nonumy eirmod tem & 0 & Std & 0 \euro{} & 0,00 \euro{}\\
    \multicolumn{5}{r}{Zwischensumme Android (exkl. MwSt.):} & 0,00 \euro{}\\
    \\

    \hline\hline 
\end{longtable}

%===================================
\begin{longtable}{p{5.5cm}p{2.5cm}p{2.5cm}p{2cm}p{3cm}}
    \hline Nettobetrag Gesamt & 19\% MwSt. & Versand & Verpackung & Bruttobetrag\\
    \hline 
    0,00 \euro{} & 0,00 \euro & 0,00 \euro & 0,00 \euro & 0,00 \euro{}\\
    \hline\hline    
\end{longtable}


\end{letter}
\end{document}

The data.tex is the following:

\setkomavar{fromname}{YourCompany GmbH}
\setkomavar{fromphone}{+49 (0) 123 / 456 78-9}
\setkomavar{fromaddress}{Musterweg 3 \\ D-12345 Stuttgart}
\setkomavar{frombank}{Volksbank Musterstadt \\ BLZ: 123 456 00 \\ \\ Kontonummer: 123 456 000\\Volksbank Musterstadt}

\firstfoot{
    \parbox[t]{\textwidth}{\footnotesize 

    \begin{tabular}[t]{l@{}}
         \multicolumn{1}{@{}l@{}}{Firma:}\\ 
         YourCompany GmbH\\
         Musterweg 3, D-12345 Stuttgart\\ \\
         Telefon: \usekomavar{fromphone} \\
         E-Mail: info@yourcompany.de \\
    \end{tabular}
     \hfill{}
     \begin{tabular}[t]{l@{}}
         \multicolumn{1}{@{}l@{}}{Rechtliche Informationen:}\\ 
        Gerichtsstand Muster\\
        Registernummer: HRB 123456\\ \\

        Geschäftsführer: Max Muster\\       
        Ust.-ID-Nr.: DE1234567890\\
     \end{tabular}
     \hfill{}
     \begin{tabular}[t]{l@{}}
         \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\ 
         \usekomavar{frombank} 
     \end{tabular} 
 }}

I get the following:

At the end of page 1:

enter image description here

and at the end of page 2:

enter image description here

What can we do so that the footer of the first page is the same also at the end of the second page instead of "Seite 2" ?

  • 1
    Please what is the content of the inputed file \input{data.tex}? Please add it to your question, but change all personal informations to dummy text ... I guess there is a foot definition inside ... – Mensch Sep 29 '17 at 18:45
  • 1
    I just looked at texdoc koma and the only thing it says about \firstfoot is that it's deprecated and shouldn't be used, I guess you want \setkomavar{nextfoot}{...} or similar in this case. see page 146 on the scrlttr2 class. – David Carlisle Sep 29 '17 at 19:38
  • So do I have to change something only in data.tex not in the main part, or not? @DavidCarlisle – Mary Star Sep 29 '17 at 19:46
  • 1
    I only glanced at the manual and have never used the class, but it's fairly clear surely the \firstfoot command you have in the data file is just setting the foot of the first page and you need to change that to something else. the data.tex file is just input so any pf the commands that are in there could be in the main file, it makes no difference. – David Carlisle Sep 29 '17 at 19:51
3

Replace the outdated \firstfoot by \setkomavar{firstfoot}{...}.

To get the same footer on the second page you can use

\pagestyle{headings}
\setkomavar{nexthead}{}
\setkomavar{nextfoot}{\usekomavar{firstfoot}}

Unfortunaly we do not know what the contents of your template.lco is. So maybe you change the pseudolength firstfootvskip there. Without this lco file I have to add

\makeatletter
\@addtoplength[-]{firstfootvpos}{\footskip}
\makeatother

to get the whole footer visible on the first page.

enter image description here

\documentclass[DIN,
    %pagenumber=footmiddle,
    parskip=half,
    fromalign=right,  % Align sender to the right
    fromphone=true, fromfax=false,
    fromrule=false]{scrlttr2}

\usepackage[ngerman]{babel}% <- use this instead package ngerman
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{eurosym}

%\LoadLetterOption{template}% <- we do not have your lco file
\renewcommand*{\raggedsignature}{\raggedright} 

%=================================================
% file contains sender-address
%\input{data.tex}
\setkomavar{fromname}{YourCompany GmbH}
\setkomavar{fromphone}{+49 (0) 123 / 456 78-9}
\setkomavar{fromaddress}{Musterweg 3 \\ D-12345 Stuttgart}
\setkomavar{frombank}{Volksbank Musterstadt \\ BLZ: 123 456 00 \\ \\ Kontonummer: 123 456 000\\Volksbank Musterstadt}

\setkomavar{firstfoot}{%<- changed
    \parbox[t]{\textwidth}{\footnotesize 

    \begin{tabular}[t]{l@{}}
         \multicolumn{1}{@{}l@{}}{Firma:}\\ 
         YourCompany GmbH\\
         Musterweg 3, D-12345 Stuttgart\\ \\
         Telefon: \usekomavar{fromphone} \\
         E-Mail: info@yourcompany.de \\
    \end{tabular}
     \hfill{}
     \begin{tabular}[t]{l@{}}
         \multicolumn{1}{@{}l@{}}{Rechtliche Informationen:}\\ 
        Gerichtsstand Muster\\
        Registernummer: HRB 123456\\ \\
        Geschäftsführer: Max Muster\\
        Ust.-ID-Nr.: DE1234567890\\
     \end{tabular}
     \hfill{}
     \begin{tabular}[t]{l@{}}
         \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\ 
         \usekomavar{frombank} 
     \end{tabular} 
 }}

\pagestyle{headings}
\setkomavar{nexthead}{}
\setkomavar{nextfoot}{\usekomavar{firstfoot}}
\makeatletter
\@addtoplength[-]{firstfootvpos}{\footskip}
\makeatother
%===================================

\setkomavar{subject}[]{Angebot über die Entwicklung einer Smartphone-Anwendung}
\setkomavar{yourmail}[Ihre Angebots-Nr.]{2010122621}
\setkomavar{yourref}[Ihre Kundennummer]{262}
\setkomavar{date}[Datum]{24. Februar 2011}

\usepackage{lipsum}% only for dummy text
\begin{document}

%===================================
% receiver
\begin{letter}{
    Max \& Mustermann Agency\\ 
    z.Hd. Herrn Mustermann\\[\baselineskip]
    Musterstr. 12\\
    12345 Musterstadt
}

%===================================
\opening{Sehr geehrte Damen und Herren,}
\lipsum[1]
\closing{Mit freundlichen Grüßen}

\setkomavar*{enclseparator}{Anlage} 
\encl{Angebotsausarbeitung}

\newpage
\lipsum[1-3]
\end{letter}
\end{document}
  • It works now!! Thank you so much!! :-) – Mary Star Sep 29 '17 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.