tags:

views:

184

answers:

3

I'm using TeXshop, Natbib, Hyperef and two-column layout, and I am getting the following message:

\pdfendlink ended up in different nesting level than \pdfstartlink

\AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi

which prevents LaTeX from compiling. This document compiles without problem when it is 'onecolumn', the problem only starts when it is 'twocolumn'.

I've searched online for solutions, but most of them are from a few years ago, and identify the problem as being caused by a 'long reference'.

Examples of solutions 1, 2

I've narrowed down the source of the problem to be a section that occurs after a table that is two columns wide. The section that follows does not have any references, but when I include it, it stops compiling. I have not included code here as to replicate the problem I need to include my entire document; it only occurs when there is a certain spacing.

Another reference, suggesting that is an obscure bug. I cannot apply their suggestion as I cannot locate the problem reference. I have, just shoved in a lot of spaces and it does compile, however this not really a solution for a working document.

+1  A: 
  1. Work on understanding the solutions. LaTeX is a very technical thing, like programming, and if you want to use it you have to accept the fact that you're going to be stuck using your brain to think through solutions.

  2. The error itself is pretty descriptive. Are your levels of nesting for your /begin{} and /end{} statements all lined up properly? All the macros that you're using are being used correctly? Review the documentation for the packages that you're using.

  3. Like programming, when you're not sure what's going on, recreate the error with the simplest possible code that you can use. If that on its own does not already tell you the error (it frequently does!), then post that simplest possible code with your question so that we at least have some small chance to help. Sadly, due to the complexity of LaTeX, things like package versions may also be quite relevant to the troubleshooting process.

Greg D
The error is descriptive, but it appears to be a glitch when using this particular combination of settings. Applying the suggested solutions, which are all from a few years ago, do not solve the problem. A common cause appears to be a reference that is too long, however, when I remove all references from the offending section, I still have the same problem.
celenius
+3  A: 

Make a copy of your LaTeX source and start ripping the content out of it until you have the smallest possible example that still causes this error. If that alone reveals the problem, post it here as an answer. If it doesn't, append it to the question.

dreeves
A: 

Having the same problem here and it popped-up from nowhere. Interestingly if I comment out the hyperref package it works.

Chase
I think the problem is when it tries to put a hyperref on a place where it can not fit, you get the error. If you can somehow edit the spacing overall (add a pagebreak, table of contents, etc) it stops. I found that just by playing around with it over time.
celenius