0

I am using the \pagestyle{scrheadings} with the current chaptername in the header. There is one chapter that should not appear in the table of contents, which is the reason why I'm using \chapter*{MyChapter}. The problem is that the chaptername of MyChapter is not shown in the header, but the name of the previous chapter. How can I change the chaptername in the header for only one single page?

Thank you

  • Try \chaptermark{MyChapter} right after the \chapter*. – Tiuri Feb 21 '18 at 12:51
  • 2
    \markboth{title wombat}{title wombat} – Johannes_B Feb 21 '18 at 13:12
  • @Johannes_B this worked like a charm, thanks – mrk Feb 21 '18 at 14:27
1

With a KOMA-Script class you could set class option

headings=optiontoheadandtoc

Then you can use

\addchap[tocentry={}]{Chapter without tocentry} 

to get an unnumbered chapter with with the same entry in header but without an entry in the table of contents.

Example:

\documentclass[
  headings=optiontoheadandtoc
]{scrreprt}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{lipsum}% only for dummy text
\begin{document}
\tableofcontents
\chapter{First Chapter}
\lipsum
\addchap[tocentry={}]{Chapter without tocentry}
\lipsum
\chapter[Entry in header und ToC]{Another chapter}
\lipsum
\end{document}

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.