Sie sind hier

How to move the page number to the middle of the foot for a double-sided document

Bild von Markus Kohm

Auf Deutsch: Wie man bei einem doppelseitigen Dokument die Seitenzahl in die Mitte des Fußes verschiebt

Usually, the KOMA-Script classes set the page number for a double-sided document like:

\documentclass{scrbook}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}

in the footer outside flush with the text area. The classes themselves do not offer the option of pagination in the middle of the footer instead. For a corresponding change, a package such as scrlayer-scrpage is therefore absolutely necessary.

To output the page number in the middle of the footer the command:

\cfoot*{\pagemark}

of scrlayer-scrpage can be used. The asterisk at the end of the name of the command ensures that this change is also applied to plain pages, for example, on the first page of a chapter. If you try out:

\documentclass{scrbook}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{blindtext}
\cfoot*{\pagemark}
\begin{document}
\blinddocument
\end{document}

you will get two page numbers in each foot: the desired one in the middle and the undesired one on the outside. To get rid of the default page number on the outside, you have to fill the corresponding field with an empty content by

\ofoot*{}

With:

\documentclass{scrbook}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{blindtext}
\cfoot*{\pagemark}
\ofoot*{}
\begin{document}
\blinddocument
\end{document}

you will get only the desired page number in the middle of the footer.

Comments for "How to move the page number to the middle of the foot for a double-sided document" abonnieren