General ⇒ Table of contents cannot compile with hypperref
Table of contents cannot compile with hypperref
I have a problem with my thesis document in LaTeX. I have written some chapters and included the hyperref package to get easy clickable links between sections and citations (This works). However, when I want to compile the table of contents (\tableofcontents) it wont create the pdf output.
If I then remove hypperref (%\usepackage{hyperref}) then it will compile with the ToC. But then I of course have no links.
Any suggestions on how to get both to play nicely together? OR why this happens?
Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Table of contents cannot compile with hypperref
it would be good if you would post the error message here, or the complete .log file as attachment to a post.
Stefan
Re: Table of contents cannot compile with hypperref
I stress that if dont use either hyperrref or ToC, then it works fine. Only the combination of the two that mess it up
- Attachments
-
- Thesis_Main.log
- Log file
- (18.67 KiB) Downloaded 220 times
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Table of contents cannot compile with hypperref
Code: Select all
(E:\Dropbox\Thesis\Thesis\Thesis_Main.toc
! Argument of \contentsline has an extra }.
<inserted text>
\par
l.2 \contentsline
{chapter}{\numberline {1}Growth \& Properties of Gold Nano...
?
! Emergency stop.
<inserted text>
\par
Stefan
Table of contents cannot compile with hypperref
Code: Select all
(E:\Dropbox\Thesis\Thesis\Thesis_Main.toc
! Argument of \contentsline has an extra }.
<inserted text>
\par
l.2 \contentsline
{part}{I\hspace {1em}Background \& Self-Assembly}{1}{part.1}
?
! Emergency stop.
<inserted text>
\par
l.2 \contentsline
{part}{I\hspace {1em}Background \& Self-Assembly}{1}{part.1}
End of file on the terminal!
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Table of contents cannot compile with hypperref
Stefan
Re: Table of contents cannot compile with hypperref
- Attachments
-
- mygrthesis.sty
- Style file
- (4.38 KiB) Downloaded 255 times
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Table of contents cannot compile with hypperref
Stefan
Re: Table of contents cannot compile with hypperref
- Attachments
-
- macros.tex
- (7.86 KiB) Downloaded 244 times
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Table of contents cannot compile with hypperref
So the problem could still be in the main document. I guess we need to check that, even though I thought it could be sufficient to test your customized files together with a small document containing part and chapter, which are relevant for the problem here. But that's not enough.
So, we need a code which produces the error. Once the problem can be verified, I'm sure that can be fixed. But we need to verify it. For this, please post a minimal example which brings that error when compiled. This could be a hacked down copy of your original document, a very reduced copy. Just follow the link to know why and how.
Once we have a test file here, we could run that together with the already posted customized files. Just if there are further non-standard files, we might need them too, if they are related to the problem.
Well, I'm really sure it can be fixed easily, I just don't have your files here.

Stefan