BibTeX, biblatex and biber ⇒ natbib: Bibliography headings not right
natbib: Bibliography headings not right
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!
- Attachments
-
- bib_prob.pdf
- error example (bibliography header wrong)
- (156.11 KiB) Downloaded 377 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
natbib: Bibliography headings not right
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
natbib: Bibliography headings not right
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}