General ⇒ hyperref package and table of contents
hyperref package and table of contents
Hi all,
I am having the following issue with hyperref package. As soon as I enable the package, my table of contents are not listed, I get the heading "Contents" but the rest of the page is blank. This is what is reported in the log file:
Package hyperref Warning: old toc file detected, not used; run LaTeX again.
\tf@toc=\write11
I have tried running latex number of times but I keep getting the same warning. My toc file has all the listings so it is definitely valid.
I have read the hyperref manual inside/out but to no avail.
Any help would be appreciated.
Thanks,
Santo
I am having the following issue with hyperref package. As soon as I enable the package, my table of contents are not listed, I get the heading "Contents" but the rest of the page is blank. This is what is reported in the log file:
Package hyperref Warning: old toc file detected, not used; run LaTeX again.
\tf@toc=\write11
I have tried running latex number of times but I keep getting the same warning. My toc file has all the listings so it is definitely valid.
I have read the hyperref manual inside/out but to no avail.
Any help would be appreciated.
Thanks,
Santo
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
Re: hyperref package and table of contents
Delete all files that you didn't create yourself (which means everything except the *.tex source file). Start a new compiler run and see what happens.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
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
Re: hyperref package and table of contents
Hi Thorston,
Thanks for your advise.
I deleted all files (except .tex and .sty) but it still didn't solve the problem when I recompiled it.
I have windows version of miktex running on my computer and I am using TeXnicCenter.
Any other options.
Thanks,
Santosh
Thanks for your advise.
I deleted all files (except .tex and .sty) but it still didn't solve the problem when I recompiled it.
I have windows version of miktex running on my computer and I am using TeXnicCenter.
Any other options.
Thanks,
Santosh
hyperref package and table of contents
Try processing some minimal sample document, e.g.:
Do you get the problem even then?
If not, follow the instructions here for building a minimal working example and keep expanding it towards your document until the problem emerges. There's a good chance that this process will itself reveal the problem, but if not, post the MWE here.
If you do get a problem even with this minimal code, add \listfiles to the beginning and post the complete .log file here.
Code: Select all
\documentclass{report}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\chapter{First One}
What a great chapter.
\chapter{Next One}
Wow, this one is even better.
\section{A section}
It even has a section.
\end{document}
If not, follow the instructions here for building a minimal working example and keep expanding it towards your document until the problem emerges. There's a good chance that this process will itself reveal the problem, but if not, post the MWE here.
If you do get a problem even with this minimal code, add \listfiles to the beginning and post the complete .log file here.
Re: hyperref package and table of contents
Thanks for that tip. The minimal example worked fine. So now I will build it towards my document and see where the problem is.
Will post once I have either succeeded or get to the point of the document not working.
Cheers,
Santosh
Will post once I have either succeeded or get to the point of the document not working.
Cheers,
Santosh
Re: hyperref package and table of contents
Problem solved!!
The problem was that I had my preamble (documentclass, etc commands) in a different file that I included in the main file using the \include command. Once I actually added the commands until \begin{document} to the main file, the problem disappeared and I got my table of contents.
Thanks everyone for the help.
Cheers,
Santosh
The problem was that I had my preamble (documentclass, etc commands) in a different file that I included in the main file using the \include command. Once I actually added the commands until \begin{document} to the main file, the problem disappeared and I got my table of contents.
Thanks everyone for the help.
Cheers,
Santosh
hyperref package and table of contents
You could try using the command instead of if that's really the problem.
Code: Select all
\input{}
Code: Select all
\include{}