3

I wrote a letter with multiple pages in scrlttr2. Now I get the page numbers "Seite 2" and so on, but I simply want "2" there.

I don't find an option how to turn this off, neither in the scrguide.pdf nor in the source code. This reproduces the error (I use lyx, but that doesn't matter):

\documentclass[ngerman,fromrule=off,addrfield=on,backaddress=off,fromalign=left,enlargefirstpage=off]{scrlttr2}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\usepackage{blindtext}
\geometry{verbose}
\pagestyle{plain}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newif\ifletterclosed
\AtEndDocument{\ifletterclosed\else\end{letter}\fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\pagenumbering{roman}

\makeatother

\usepackage{babel}
\begin{document}

\setkomavar{fromaddress}{from me}

\begin{letter}{to adress}

\setkomavar{date}{today}

\setkomavar{subject}{spam}

\begin{letter}{}
\LoadLetterOption{DIN}
\makeatletter
%\@setplength{refvpos}{4cm}
%\@setplength{subjectaftervskip}{1cm}
\makeatother


\opening{Dear stranger,}

\Blindtext 

\closing{Bye}

\setkomavar{signature}{My name}

\end{letter}
\end{document}

Commenting \LoadLetterOption{DIN} doesn't help. I don't see any further options that might be related to page numberings.

1 Answer 1

4

You have to redefine the \pagemark command:

\renewcommand\pagemark{\usekomafont{pagenumber}\thepage}

Additional remarks:

The letter-class-option file DIN is loaded by scrlttr2 automatically.

I do not understand why you are nesting letter environments and why you are closing the outer letter environment using \AtEndDocument. So in the following MWE there is only one letter environment:

\documentclass[ngerman,backaddress=off,fromalign=left]{scrlttr2}
\usepackage[latin9]{inputenc}
\usepackage[a4paper,verbose]{geometry}
\usepackage{babel}


\pagenumbering{roman}
\renewcommand\pagemark{\usekomafont{pagenumber}\thepage}


\usepackage{blindtext}% dummy text
\begin{document}

\setkomavar{fromaddress}{from me}
\setkomavar{signature}{My name}
\setkomavar{date}{today}
\setkomavar{subject}{spam}

\begin{letter}{to adress}

  \opening{Dear stranger,}
  \Blindtext 
  \closing{Bye}
\end{letter}
\end{document}  
1
  • It Works! Curiously, DIN 5001 does not support that kind of page numbering ("Seite 2") in scrlttr2 with DIN option Nov 5, 2015 at 17:32

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.