# scrpage2: Three “marks” for headings

As far as I know of the \automark command (scrpage2 package), it is only possible to mark two different "header-types" (e.g. sections and chapters). I'm searching for a way to mark an additional "header" (e.g. part) to use it in headings.

Example usage of this would be:

\documentclass{scrbook}

\usepackage{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\automark[section]{chapter}
\ihead{\leftmark}
\ohead{\rightmark}
\ifoot{Display part title here}

\begin{document}
\part{Test}
\chapter{Test 2}
\section{Test 3}
\end{document}


Does anybody know of an automatic way to do this? Thanks in advance for any help!

-
Before you dig, consider moving to scrlayer-scrpage. Markus Kohm has released a new version of KOMA-script (3.12). Besides that, do you simply wish to print the name of the part into each foot? –  Keks Dose Jan 7 '14 at 15:43
Hello and thanks for your comment: I wasn't aware of scrlayer-scrpage. I will search for documentation! Exactly, I'm trying to display the name of the current part in the foot. Just like the section and chapter are displayed in the head. –  Guest Jan 7 '14 at 15:46
Search for docu? If you installed texlive, it's just texdoc komascript on the commandline. miktex has something similar. –  Keks Dose Jan 7 '14 at 15:58
Well, I read the corresponding section in the updated scrguide.pdf and will use the package from now on (as there's almost no code change required). But an easy way to archieve an additional mark isn't described in the documentation. Did I miss something? –  Guest Jan 7 '14 at 17:32

## 1 Answer

Here's a simple patch: we add to \@part the code that stores in \theparttitle the current part title. You can also give anywhere \parttitle{whatever} (perhaps with an empty argument) to change the footer.

\documentclass{scrbook}
\usepackage{scrpage2}

\usepackage{etoolbox}
\makeatletter
\apptocmd{\@part}{\parttitle{#2}}{}{}
\def\parttitle#1{\gdef\theparttitle{#1}}
\def\theparttitle{} % initialization
\makeatother

\pagestyle{scrheadings}
\clearscrheadfoot
\automark[section]{chapter}
\ihead{\leftmark}
\ohead{\rightmark}
\ifoot[\theparttitle]{\theparttitle} % on both sides of a spread, just for the example

\begin{document}
\part{Test}
\chapter{Test 2}
\section{Test 3}
\end{document}


-
And thanks again! Works like a charm! –  Guest Jan 7 '14 at 18:31