GeneralInaccurate reference position due to \addcontentsline

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
andi1984
Posts: 2
Joined: Wed Oct 20, 2010 4:24 pm

Inaccurate reference position due to \addcontentsline

Post by andi1984 »

Hi together,

I've written a document including bibliography, list of figures etc. and added these to the table of contents with the command addcontentsline

Code: Select all

\addcontentsline{toc}{chapter}{References}
etc.

The entries are listed correctly in the toc (correct page number), but the reference position, if I click on one entry in the toc which was created with \addcontentsline, the reference position is inaccurate. Sometimes slight inaccuracy (1 page difference), but also inaccuracy of 2-3 pages.

Does anybody has an idea how these inaccurate reference positions can be fixed?
Last edited by andi1984 on Tue Oct 26, 2010 9:00 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.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Inaccurate reference position due to \addcontentsline

Post by gmedina »

Hi,

try using the \phantomsection command provided by the hyperref package. If the problem persists, build a minimal working example allowing us to reproduce the undesired behaviour.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
andi1984
Posts: 2
Joined: Wed Oct 20, 2010 4:24 pm

Inaccurate reference position due to \addcontentsline

Post by andi1984 »

gmedina wrote: try using the \phantomsection command provided by the hyperref package. If the problem persists, build a minimal working example allowing us to reproduce the undesired behaviour.
Thanks! Helped already!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inaccurate reference position due to \addcontentsline

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
Post Reply