LaTeX: update ‘\leftmark’ automatically on ‘\chapter*{abc123}’

latex

In my current document there are some chapters that have to be added with the \chapter*-command because I don't want them to be real chapters (no entry in toc, no chapter-number, …). This works fine.

But in my header I want the chapter-name to be displayed. I'm using fancyheaders and \leftmark:

\fancyhead[RO,LE]{\leftmark}

The problem is, that for chapters added with the \chapter*-command, \leftmark is not updated and so the header still displays the chapter-name of the previous chapter.

Therefore I either need to force \chapter* to automatically update \leftmark, or I switch to the \chapter-command but prevent the other stuff that comes along (entry in toc, …). but I don't know how! Any ideas?

Best Answer

The * forms of the \chapter etc. commands do not call the mark commands. So if you want your preface to set the header info but not be numbered nor be put in the table of contents, you must issue the \markboth command yourself, e.g.

\chapter*{abc123\markboth{abc123}{}}