[pdftex] pdflatex/natbib: \pdfendlink ended up in different nesting level than \pdfstartlink

James A. Bednar jbednar at cs.utexas.edu
Sun Feb 3 20:54:48 CET 2002

To those using pdflatex with natbib:

I've found that pdflatex from tetex 1.0.7 aborts when natbib
author-name citations are split across a page boundary in twocolumn
mode.  I've attached a test case and the output.

Heiko Oberdiek confirms that the same thing happens with TeXLive 6 and
pdfTeX 1.00a.  For technical reasons, he expects that it will be very
difficult to fix.

Of course, the workaround is to adjust the spacing or linebreaking to
avoid the troublesome linebreak.  However, this can be difficult
because no PDF output is generated when pdflatex aborts, and the error
message does not list the line or section of the source file that
would need to be changed.

Luckily, there's a solution: when this error occurs, write down the
page number where pdflatex aborted, then add the "draft" option to


and recompile the document.  PDF output will now be generated, the
problematic link should be the citation whose latter half begins the
page where pdflatex aborted.  After slightly rearranging the text to
avoid the linebreak, the [draft] option can be removed.


\setlength\topmargin{0in} \setlength\oddsidemargin{-0.25in}
\setlength\textheight{9.0in} \setlength\textwidth{7in}
\setlength\columnsep{0.25in}  \newlength\titlebox \setlength\titlebox{2in}
\setlength\headheight{0pt}   \setlength\headsep{0pt}


la la la la la la la la la la la la la la la la 

\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi

\bibitem[Hershenson et~al.(1967)Hershenson, Kessen, and
Hershenson, M., Kessen, W., and Munsinger, H. (1967).
\newblock Pattern perception in the human newborn: {A} close look at some
  positive and negative results.
\newblock In Wathen-Dunn, W., editor, \emph{Models for the Perception of Speech
  and Visual Form}. Cambridge, MA: MIT Press.


$ pdflatex pdftest.tex
This is pdfTeX, Version 3.14159-14h-released-20010417 (Web2C
LaTeX2e <2000/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, i
talian, nohyphenation, loaded.
Document Class: article 2000/05/19 v1.4b Standard LaTeX document class
Implicit mode ON; LaTeX internals redefined
*hyperref using default driver hpdftex*
(/usr/share/texmf/tex/latex/psnfss/upsy.fd))) (./pdftest.aux)
(/usr/share/texmf/tex/latex/hyperref/nameref.sty) (./pdftest.out)
(./pdftest.out) [1{/usr/share/texmf/dvips/config/pdftex.map}] [2
! pdfTeX error (ext4): \pdfendlink ended up in different nesting level than \pd
<to be read again> 
l.40 \end{document}
!  ==> Fatal error occurred, the output PDF file not finished!
Transcript written on pdftest.log.

More information about the pdftex mailing list