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
.
Wiki (English): HowTo_PageHeadFoot
Wiki (English): HowTo_PaginationInFootOutside