[Tex/LaTex] Running head in LaTeX book is wrong

bibliographiesheader-footerindexing

I have a book with 14 chapters, two appendices (each chapter and appendix in a separate file), and a bibliography and index. This is set up as:

Preamble

\mainmatter

include chapters

\appendix

include appendices

\backmatter
\bibliographystyle{plain}
\bibliography{mybibfile}
\small
\printindex

This works fine – except that the running head in the bibliography and index has the title of the last appendix on each odd numbered page. This is clearly wrong. How do I fix this up? I hadn't even noticed this until it was picked up by the proofreaders.

I am using the emptypage.sty file to ensure that empty pages have no running head (as required by my publishers).

I'm using a class file provided by the publishers; the relevant section is

\newdimen\bibindent
\setlength\bibindent{1.5em}
\newenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
       \addcontentsline{toc}{chapter}{\bibname}
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}

This looks like it should work, but it doesn't.

Best Answer

This depends very much on your class file. If you are using the standards book class the definition is:

\newenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
      :
      :

If you are using natbib it again redefine the \bibliography command:

\renewenvironment{thebibliography}[1]{%
    \bibsection
    :
    :

with

\providecommand\bibsection{}
\renewcommand\bibsection{%
    \chapter*{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%

In both cases it would give the correct output, but the \pagestyle{empty} turns of the \markboth command. If you point us the you class file we can take look.

Otherwise redefine the \cleardoublepage command to insert the empty page style.

\makeatletter   
\renewcommand\cleardoublepage{%
    \clearpage
    \if@twoside \ifodd\c@page\else
        \hbox{}\thispagestyle{empty}%
        \newpage\if@twocolumn\hbox{}\newpage
    \fi\fi\fi}
\makeatother
Related Question