# KOMA script - Page heading for unnumbered chapter vs. automark

I'm using the following document structure based on KOMA script classes and styles

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\automark[section]{chapter}


(plus some more stuff I'm not listing here). This works very well in general. But I do have an unnumbered chapter like this

  \addcontentsline{toc}{chapter}{Bla bla}
\chapter*{Bla bla}


and I want its title (no number) to appear in the heading of right pages (left pages blank as there are no numbered sections in this chapter). As was to be expected, this does not work out of the box, it currently lists the name of the previous chapter (list of figures).

How can I make it work? Would a manually issued \markboth{}{Bla bla} be the right way to go? From the KOMA script documentation I'm not quite sure how that would interfere with the automark stuff.

With the KOMA-Script classes scrbook and scrreprt you can use \chaptermark{...}, \sectionmark, \chaptermarkformat{...}, \sectionmarkformat{...} to set and format the running headings. A little example:

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\automark[section]{chapter}
\usepackage{lipsum}

\begin{document}

\chapter{A numbered chapter}
\section{Test section}
\lipsum[1-5]
\chapter*{A chapter without number}
\renewcommand*{\chaptermarkformat}{}
\renewcommand*{\sectionmarkformat}{}
\chaptermark{}
\sectionmark{A chapter without number}
\lipsum[1-30]

\end{document}

• Ok. That's definitely going into the right direction. However, the \renewcommand*{\chaptermarkformat}{} part does also kill numbering and formats for all subsequent chapters and sections. Is there a way to prevent this? Mar 27, 2011 at 21:34
• You can keep the changes local by enclosing the affected chapter and its contents inside a pair of braces. Mar 27, 2011 at 21:36
• Damn! Of course.. Could have thought of this myself. It's getting late.. Thanks a lot! Mar 27, 2011 at 21:41
• Thanks a lot for mentioning \chaptermark. For one of my pages \ohead{Appendix} did not work, writing the wrong chapter name. Finally got it to work! Aug 22, 2014 at 8:21
• Some options are deprecated with current KOMA-Script and should be replaced: BCOR10mmBCOR=10mm and DIV11DIV=11. Mar 7, 2017 at 12:16

The KOMA-script classes also has the command \addchap instead of \chapter*. Using \addchap should correct the problem of misnamed headers. This command also automatically creates a ToC entry so \addcontentsline{toc}{chapter}{...} isn't needed anymore.

See the MWE modified from above using the KOMA-script class native commands.

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\automark[section]{chapter}
\usepackage{lipsum}

\begin{document}

\chapter{A numbered chapter}
\section{Test section}
\lipsum[1-5]

• @clemens Actually there is a version with a star \addchap*{My Chapter}. And as expected, that chapter won't appear in the ToC. However it will have the same issue as the normal \chapter*{My Chapter} and there will be no \headmark set... But you can add \markboth{\headmark}{My Chapter} just after the definition of your chapter and you will get both: No entry in the ToC but a page heading. Just in case there is someone else struggling around with this... Feb 13, 2017 at 5:54
• @mozzbozz: With option heading=optiontoheadandtoc you can simply use \addchap[tocentry={}]{My Chapter} to have a running head but not a toc entry. Mar 7, 2017 at 12:14
• You should replace deprecated options: BCOR10mmBCOR=10mm and DIV11DIV=11. Mar 7, 2017 at 12:15