tags:

views:

70

answers:

2

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?

A: 

I'm not sure this will work, because I don't have LaTeX installed on my current machine...

But you could try setting a \markleft command after your \chapter* command like so:

\chapter*{Chapter title goes here}
\markleft{Chapter title goes here}  % content should be added to the \leftmark

Hope this helps.

froeschli
thanks for your answer! but the problem is, that if i once set \leftmark manually, later \chapter-commands won't update it again!
NATOR
Seems that is intended. See [fancy header documentation][1] pages 10-11 for further detail on the matter. [1]:http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/fancyhdr.pdf
froeschli
+1  A: 

allright, i did it! the solution is to redefine \leftmark only within a specific block! pretty simple if you know it ;)

{
    \renewcommand{\leftmark}{ABC123}
    \chapter*{ABC123}

    %... and so on ...
}
NATOR
Do I understand correctly: you are redefining \leftmark for every \chapter* ??
froeschli