GeneralBibliography in ToC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ac10
Posts: 13
Joined: Wed Dec 29, 2010 3:01 pm

Bibliography in ToC

Post by ac10 »

Hello,

I'm using the book document class. I have just added my bibliography to the ToC using...

Code: Select all

\cleardoublepage

\addcontentsline{toc}{chapter}{Bibliography}
\begin{thebibliography}{200}
.
.
.
\end{thebibliography}
The Bibliography appeared in my ToC, but when I follow the link it takes me to the page before the bibliography.

If I do...

Code: Select all

\cleardoublepage

\begin{thebibliography}{200}
\addcontentsline{toc}{chapter}{Bibliography}
.
.
.
\end{thebibliography}
... the link takes me to the correct page, but below the heading "Bibliography". As all my other ToC links go to points just above the headings, I would like that to happen for the bibliography too.

Does anyone have any ideas? Thanks for your time...
Last edited by ac10 on Sat Oct 01, 2011 8:56 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Bibliography in ToC

Post by Stefan Kottwitz »

Use \phantomsection, such as

Code: Select all

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\begin{thebibliography}{200}
Stefan
LaTeX.org admin
ac10
Posts: 13
Joined: Wed Dec 29, 2010 3:01 pm

Re: Bibliography in ToC

Post by ac10 »

That's great... Thanks for the help
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Bibliography in ToC

Post by localghost »

Actually for the standard classes the tocbibind package should be the way to go. Other classes like those from KOMA Script or the memoir class have built-in mechanisms.


Thorsten
Post Reply