# hyperref and natbib problems

Today I was working on revisions to my dissertation, and I wanted to test something out in my slick two column layout, and was surprised when my document would not compile. After about a half an hour of commenting and uncommenting parts, and seeing the same error over and over again,

\pdfendlink ended up in different nesting level than \pdfstartlink

I narrowed down the problem to some citations that I had. I had one \citep command with two arguments, one of which contained a two author paper, and the other a three author paper. Apparently LaTeX was trying to typeset these all on the same line or something, and it was causing some problem with hyperlinks, which caused LaTeX to barf on the whole thing. I eventually ended up just changing the text a little bit, so that the first paper reference came on a different line than the second one. I am curious to know if there is a better solution than this.

Anyone??

This entry was posted in latex. Bookmark the permalink.

### 3 Responses to hyperref and natbib problems

1. Tim says:

I think this is not a line-break problem per se, but it appears to be one when the break is also a pagebreak (or perhaps a column break).
Try putting an \mbox{ } around your cite link. Then it won’t break across the page, so the problem will no longer exist. The line may look weird, but at least you’ll be able to comile the doc.