2

I am using the scrlayer-scrpage package with Koma scrlttr2. Since I replaced scrpage2 with scrlayer-scrpage I have a problem with the formating of page numbers.

I would like to only have the actual # on the page but with my current setting (see below) I get "page #". Can anyone tell me how to get rid of the word "page". Thank you!

\documentclass[%
  fontsize=12pt,% 
  version=last,%   
  paper=letterpaper,%%      
  draft=on%       
]{scrlttr2}
\usepackage[%
automark,%
nouppercase,%
draft=false%
]{scrlayer-scrpage} 
2

The class scrlttr2 defines \pagemark as

\newcommand*{%
  \pagemark
}{%
  {\usekomafont{pagenumber}{%
    \pagename\nobreakspace
    \thepage}}}

While scrpage2 overwrites this definition, scrlayer-scrpage does not change any existing definition of \ pagemark. So you have to redefine \ pagemark yourself:

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

Example:

\documentclass[%
  fontsize=12pt,% 
  version=last,%   
  %paper=letterpaper,%% unused global option!!
  draft=on%       
]{scrlttr2}
\renewcommand*{\pagemark}{{\usekomafont{pagenumber}{\thepage}}}

\usepackage[%
  automark,%
  nouppercase,%
  draft=false%
]{scrlayer-scrpage}

\usepackage{lipsum}% only for dummy text
\begin{document}
\begin{letter}{Max}
\opening{Hello,}
\lipsum
\end{letter}
\end{document}

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.