1

For a document, I use the following setup:

\usepackage{scrextend}
\usepackage[automark]{scrpage2}

\renewcommand{\headfont}{\sffamily}

\clearscrheadfoot
\cfoot{\pagemark}

\setkomafont{pagenumber}{\normalfont\sffamily}
\renewcommand{\chapterpagestyle}{scrheadings}

\defpagestyle{std}{(0 pt, 0 pt){\headmark\hfill}{\hfill\headmark}{}(\textwidth,1 pt)}{(0 pt, 0 pt){\pagemark}{\hfill\pagemark}{}(0 pt, 0 pt)}

Basically, this works just fine for me. However, I have a small but very nettlesome problem that all blank pages (after the TOC), produced by the command openright for example, do not contain a page number. I was wondering if there is a simple way to solve this?

  • 2
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. – karlkoeller May 13 '15 at 8:46
  • more often the complaint has been that blank pages contain an unwanted page number. i'm not familiar with the koma packages, but in others, the page number on blank pages is managed (i.e. suppressed or not) by the \cleardoublepage command. you might look for that definition, and adjust as appropriate. – barbara beeton May 13 '15 at 13:42
3

KOMA-Script class

I guess you are using a twosided KOMA-Script class. If that is true do not load the package scrextend. Instead use one the class option cleardoublepage=<page style>.

Example:

\documentclass[
  cleardoublepage=plain
]{scrbook}

\usepackage[automark,headsepline=1pt]{scrlayer-scrpage}
\setkomafont{pagehead}{\normalfont\sffamily}
\clearpairofpagestyles
\ohead{\headmark}
\ofoot*{\pagemark}

\usepackage{blindtext}% dummytext

\renewcommand{\chapterpagestyle}{scrheadings}

\begin{document}
\tableofcontents
\blinddocument\Blindtext
\blinddocument\Blindtext
\end{document}

enter image description here

Other class

But if you are using a different class you can load scrextend with the option cleardoublepage=<page style>.

Example:

\documentclass{book}
\usepackage[
  cleardoublepage=plain
]{scrextend}

\usepackage[automark,headsepline=1pt]{scrlayer-scrpage}
\setkomafont{pagehead}{\normalfont\sffamily}
\clearpairofpagestyles
\ohead{\headmark}
\ofoot*{\pagemark}

\usepackage{blindtext}% dummytext

%\renewcommand{\chapterpagestyle}{scrheadings}

\begin{document}
\tableofcontents
\blinddocument\Blindtext
\blinddocument\Blindtext
\end{document}
  • For other classes one can load \usepackage{emptypage} (it's compatible with fancyhdr, for instance). – egreg May 13 '15 at 14:00
  • @egreg The OP is not asking for empty pages. There should be a page number on the blank pages. Additionally scrextend is also compatible with fancyhdr. – esdd May 13 '15 at 17:44

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.