1

I am using sr-vorl (a scrbook-based class to typeset books for Springer; the package can be found here) for my dissertation at the moment.

Springer demands to have a running head where the chapter name occurs on all pages with even page numbers and the section name on pages with odd page numbers. In general, that works well out of the box.

However, I now have the case that I have much text between \chapter{} and the first \section{}. This results in the problem that an empty running head (i.e., empty \leftmark) is set on certain pages (the odd ones). Please see below:

enter image description here

Only after the first \section{} occurs I get the desired result:

enter image description here

This clearly is an expected result. However, I would like to have the chapter name occuring on the odd pages instead of nothing (i.e., in this case here: "1 First Chapter").

I already did some research but only found a few answers that did not help me (e.g., 1, 2 -> it might be that the answers there give the solution, but I could not figure out how to apply them for my problem).

Question:

How can I get the chapter name on the running head of an odd-numbered page when there is no section name that can be printed there?

(Please note: The problem also occurs with plain scrbook.)


Here is a MWE:

\documentclass[englisch, format=a5-monografie]{sr-vorl}

\usepackage{lipsum}

\usepackage[utf8]{inputenc}

\begin{document}

\mainmatter

\chapter{First Chapter}

\lipsum[4-20]

\section{First Section}

\end{document}
1
  • 1
    (not tested.) with the basic latex classes you can add \markright{chapter name} after the \chapter line, and that would include the chapter name in the right-hand running head until overridden by a section. but i don't know whether this works with the scr* classes, and can't test at the moment.) Mar 17, 2017 at 0:16

1 Answer 1

2

sr-vorl loads the deprecaited package scrpage2 to define the pagestyle sr-standard by

\defpagestyle{sr-standard}% Standard pagestyle
{%
(0pt,0pt)%
{\pagemark\hfill\headmark}%
{\headmark\hfill\pagemark}%
{}%
(\textwidth,0.5pt)%
}%
{%
(0pt,0pt)%
{}%
{}%
{}%
(0pt,0pt)%
}%

So there are different possibilities to get the desired result.


You could replace scrpage2 by its successor scrlayer-scrpage. This package knows a starred version of \automark.

\RequirePackage{scrlfile}
\ReplacePackage{scrpage2}{scrlayer-scrpage}
%
\documentclass[englisch, format=a5-monografie]{sr-vorl}
%
\automark[chapter]{chapter}
\automark*[section]{}

\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\begin{document}
\mainmatter
\chapter{First Chapter}
\lipsum[4-20]
\section{First Section}
\end{document}

enter image description here

enter image description here


Or you can redefine pagestyle sr-standard:

\documentclass[englisch, format=a5-monografie]{sr-vorl}

\renewpagestyle{sr-standard}% Standard pagestyle
{%
(0pt,0pt)%
{\pagemark\hfill\headmark}%
{\ifstr{\headmark}{}{\leftmark}{\headmark}\hfill\pagemark}%<- changed
{}%
(\textwidth,0.5pt)%
}%
{%
(0pt,0pt)%
{}%
{}%
{}%
(0pt,0pt)%
}%

\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\begin{document}
\mainmatter
\chapter{First Chapter}
\lipsum[4-20]
\section{First Section}
\end{document}

Or you can manually redefine \chaptermark:

\documentclass[englisch, format=a5-monografie]{sr-vorl}

\makeatletter
\renewcommand*{\chaptermark}[1]{%
  \markboth
    {\MakeMarkcase{\ifnumbered{chapter}{%
        \if@mainmatter
          \chaptermarkformat
        \fi
      }{}#1}%
    }
    {\MakeMarkcase{\ifnumbered{chapter}{%
        \if@mainmatter
          \chaptermarkformat
        \fi
      }{}#1}%
    }%
}%
\makeatother

\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\begin{document}
\mainmatter
\chapter{First Chapter}
\lipsum[4-20]
\section{First Section}
\end{document}
1
  • Superior answer! I used number one of your suggestions and it worked just fine. Many thanks!
    – phx
    Mar 17, 2017 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.