4

Using the scrbook class of KOMA script I created two distinc page styles named StyleA and StyleB via the \newpagestyle command. I'd like to apply the first style to a single page. If the content of the page I applied StyleA to, spans over multiple pages, the second style should be used by all subsequent pages. However, I don't know the size of the content in adavance.

How do I implement this behavior using KOMA script?

Schweinebacke
  • 26,336

1 Answers1

8

\thispagestyle{StyleA} sets the page style only for the current page. On the next page the style set by \pagestyle will be used again.

Example:

\documentclass{scrbook}
\usepackage{scrlayer-scrpage}
\newpagestyle{StyleA}{{StyleA left page}{StyleA right page}{Style A onesided document}}{{}{}{}}
\newpagestyle{StyleB}{{StyleB left page}{StyleB right page}{Style A onesided document}}{{}{}{}}
\usepackage{lipsum}
\begin{document}
\pagestyle{StyleB}% use StyeleB for the document
\lipsum[1-15]
\clearpage
\thispagestyle{StyleA}% use StyleA only for this page
\lipsum
\end{document}

enter image description here

esdd
  • 85,675