I am using the class scrreport
with the following setup
\documentclass[11pt,twoside,DIV=12]{scrreprt}
Inside the document
I include several pdf files via \includepdf
from the pdfpages
package.
Each included pdf file spans several pages of the correct dimension (A4).
I want the included pdf pages to carry page numbers.
In this reply, people suggested using
\includepdf[pagecommand={\thispagestyle{plain}}]{some.pdf}
This prints the correct page numbers, however, it makes the page numbers collide with the actual text. After all, the margins of my text and that of the included pdf pages are not compatible.
How can I move the page numbers into the outer margins (twoside) for the imported pdf files without messing around with the header/footer for the normal pages?
Do I need to define a new pagestyle for them, i.e. change the width of the footer for these pages? Do I need to change the "margins" for the imported pdf pages via typearea
somehow, such that the normal pagestyle plain
uses the avaiable space?
I can only find answers that refer to fancyhdr
or to geometry
, which (as far as I understood) are not supposed to be used with koma script. And the documentation for koma script is confusing me more than it helps.
In this other question, the imported pdf pages were supposed to provide different information than the normal plain
style.
I am totally happy with the simple page number.
Only the location is unfortunate.
Any hint is appreciated.
[edit:]
A minimum working example would be composed of two files: The first
\documentclass[10pt]{article}
\usepackage[left=2.5cm,right=2.5cm,top=1cm,bottom=1cm,footskip=0cm]{geometry}
\usepackage{lipsum}
\pagestyle{plain}
\begin{document}
\lipsum[1-24]
\end{document}
generates some text as some.pdf
pages. The second
\documentclass[11pt,twoside,DIV=12]{scrreprt}
\usepackage{lipsum}
\usepackage{pdfpages}
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
\begin{document}
\chapter{Regular Pages}
\lipsum[1-6]
\section{More Text}
\lipsum[7-14]
\chapter{Imported Pages}
In the following I provide imported pages.
\includepdf[pages=1-2,pagecommand={\thispagestyle{plain}}]{some.pdf}
\end{document}
imports some pages and adds its own plain
page numbers. The first included pdfpage now has the normal imported text (including its own pagenumber 1), as well as the added pagenumber 5, which collides with the imported text:
How do I move the pagenumber 5 into the outer margins, without changing the setup of the other pages? I especially want page number 2 to still look like this:
\documentclass{...}
and ending with\end{document}
.