Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I find it strange that the page header in the chapter “Title2” is not updated in the example below:

\documentclass[12pt]{book}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter{Title1}
\lipsum[10]
\clearpage
\chapter*{Title2}
\addcontentsline{toc}{chapter}{Title2}
\lipsum{5}
\end{document}

What should be done?

share|improve this question
    
Which header should be updated to what? –  Caramdir Apr 15 '11 at 20:34
    
header of chapter*2 was the header of chapter 1 –  pluton Apr 15 '11 at 20:52

1 Answer 1

up vote 6 down vote accepted

\chapter* neither adds a ToC entry nor adjusts the content of headers/footers. For the latter, add \markboth with appropriate parameters. EDIT: This results in correct headers/footers for the (default) twoside class option; for oneside, \markright should be used.

\documentclass[12pt]{book}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter{Title1}
\lipsum[10]
\clearpage
\chapter*{Title2}
\addcontentsline{toc}{chapter}{Title2}
\markboth{\MakeUppercase{Title2}}{}% for "twoside" class option
% \markright{\MakeUppercase{Title2}}% for "oneside" class option
\lipsum{5}
\end{document}
share|improve this answer
    
thank you very much –  pluton Apr 15 '11 at 20:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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