GeneralError: \pdfendlink cannot be used in vertical mode

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Nicky
Posts: 2
Joined: Sun May 15, 2016 11:53 am

Error: \pdfendlink cannot be used in vertical mode

Post by Nicky »

Dear all,

I am not a very experienced LaTeX user, however, now I write my thesis in it. At the moment I was almost done and just wanted to change the page numbering, I received the following error:

Code: Select all

./article_2.toc:1:
pdfTeX error (ext1): \pdfendlink cannot be used in vertical
mode.
\close@pdflink ...\Hy@VerboseLinkStop \pdfendlink 
                                                  
l.1 ...tion}{\numberline {I}\vfill }{1}{section.1}
Does anyone has a clue how to fix this? I already went back to previous versions, however, the error remains. Ideas to solve this are really appreciated!

Best,
Nicky
Last edited by Stefan Kottwitz on Thu Sep 15, 2016 1:30 pm, edited 2 times 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.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Error: \pdfendlink cannot be used in vertical mode

Post by Johannes_B »

Welcome,

your error is in a helper file generated by LaTeX on every run. Remove the file with the ending toc.

If the error hasn't gone away, please prepare a minimal working example for us, so we can reproduce your error and help you.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Error: \pdfendlink cannot be used in vertical mode

Post by Stefan Kottwitz »

Hi Nicky,

welcome to the forum!

We had a very similar error here: Listoffigures prevents compiling. A list of figures works just like a table of contents, so with the same error message you probably have the same cause: a fragile command, here within a \section command.

Take a look at your \section commands. You may need to change one, such as by inserting a \protect command at the problem position.

If you don't find it yourself, just show us your code. You may omit text content.

Stefan
LaTeX.org admin
Nicky
Posts: 2
Joined: Sun May 15, 2016 11:53 am

Re: Error

Post by Nicky »

Thank you both for your help! The problem is solved!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Re: Error

Post by Stefan Kottwitz »

Hi Nicky,

good to see that the problem is solved!

It would be great if you would tell us, what specifically was the issue in the code, how the affected code line looked like. Besides our curiosity, it may help further readers later who may stumble across this web page googling for the same error message.

Thanks!

Stefan
LaTeX.org admin
Amruthwar Swaroopa
Posts: 1
Joined: Wed Jun 02, 2021 4:28 pm

Error: \pdfendlink cannot be used in vertical mode

Post by Amruthwar Swaroopa »

I have same error I didn't know where to insert \protect please tell me clearly.. sir..how can we find where this error occured..
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Error: \pdfendlink cannot be used in vertical mode

Post by Stefan Kottwitz »

Hi Amruthwar,

welcome to the forum!

Perhaps show your code, then we can tell you what the cause of the issue is. Also, you can find the location of the error in your .log file.

Stefan
LaTeX.org admin
Post Reply