Hi,
I'm creating a book and using natbib and fancyhdr. I have the following (along with a number of other packages):
\usepackage{natbib}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[CE,CO]{\bfseries\thepage}
\fancyhead[CO]{\bfseries\rightmark}
\fancyhead[CE]{\bfseries\leftmark}
\fancyhead[RE]{\thepage}
\fancyhead[LO]{\thepage}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line
}
and below in the same file:
\tableofcontents
\listoftables
\addcontentsline{toc}{chapter}{Introduction}
\include{pref}
\include{symb}
\include{ortho}
\pagenumbering{arabic}
\include{ch1}
\include{2c}
...
\bibliographystyle{apalike}
\bibliography{dis}
\addcontentsline{toc}{chapter}{Bibliography}
\pagestyle{fancy}
\fancyhead[CE]{Bibliography}
\fancyhead[CO]{Bibliography}
Everything works fine with the exception of the bibliography heading (see attached). The chapter title is correct (Bibliography), but only the last page has "Bibliography" in the heading...the other pages have the previous chapter and title in the headings. Any ideas what I am doing wrong? Or how I can fix this? I would like to have "Bibliography" in the header of each page in this section.
Thanks!
BibTeX, biblatex and biber ⇒ natbib: Bibliography headings not right
natbib: Bibliography headings not right
- Attachments
-
- bib_prob.pdf
- error example (bibliography header wrong)
- (156.11 KiB) Downloaded 376 times
Last edited by shannon on Fri Jul 23, 2010 11:26 pm, edited 2 times in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
natbib: Bibliography headings not right
Please provide a full and minimal example. Emphasize is on „minimal“. Code snippets and an example of the output are insufficient.
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
natbib: Bibliography headings not right
Sorry for the errors in posting. The problem was solved by a changing:
to:
Again, sorry for the etiquette errors.
Code: Select all
\bibliographystyle{apalike}
\bibliography{dis}
\addcontentsline{toc}{chapter}{Bibliography}
\pagestyle{fancy}
\fancyhead[CE]{Bibliography}
\fancyhead[CO]{Bibliography}
Code: Select all
\pagestyle{fancy}
\fancyhead[CE]{Bibliography}
\fancyhead[CO]{Bibliography}
\bibliographystyle{apalike}
\bibliography{dis}
\addcontentsline{toc}{chapter}{Bibliography}