Menu

HowTo_PaginationInFooterRight

How to move the page number to the right for a single-sided document

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

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

is centred in the footer. The classes themselves do not offer the option of pagination right aligned in the footer (relative to the text area). For a corresponding change, a package such as scrlayer-scrpage is therefore absolutely necessary.

To output the page number right aligned in the footer the command:

\ofoot*{\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{scrreprt}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{blindtext}
\ofoot*{\pagemark}
\begin{document}
\blinddocument
\end{document}

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

\cfoot*{}

With:

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

you will get only the desired right aligned page number in the footer.

Instead of \ofoot*, \rofoot* could have been used in the examples, since in single-sided documents only right (in LaTeX terminology odd) pages exist. However, there is a difference when using option twoside=semi.


Related

Wiki (English): HowTo_PageHeadFoot
Wiki (English): HowTo_PaginationInFootOutside

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.