[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
hyperref:
\usepackage[draft]{hyperref}
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.
Jim
-------------------------------------------------------------------------------
\documentclass[10pt,letterpaper]{article}
\twocolumn
\usepackage[sort&compress]{natbib}
\usepackage{hyperref}
\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}
\setlength\footskip{22pt}
\setlength{\marginparwidth}{0.5in}
\title{One\\Two}
\author{None}
\newcommand{\BIBand}{and}
\begin{document}
\maketitle
\vspace*{5in}x\\
\vspace*{6.6in}x
la\\
la la la la la la la la la la la la la la la la
\cite*{hershenson:mpsvf67}
la
\begin{thebibliography}{1}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\providecommand{\biblink}[2]{#1}
\bibitem[Hershenson et~al.(1967)Hershenson, Kessen, and
Munsinger]{hershenson:mpsvf67}
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.
\end{thebibliography}
\end{document}
-------------------------------------------------------------------------------
$ pdflatex pdftest.tex
This is pdfTeX, Version 3.14159-14h-released-20010417 (Web2C 7.3.3.1)
(./pdftest.tex{/usr/share/texmf/pdftex/config/pdftex.cfg}
LaTeX2e <2000/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, i
talian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2000/05/19 v1.4b Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/latex/natbib/natbib.sty)
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf/tex/latex/html/url.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf/tex/latex/psnfss/pifont.sty
(/usr/share/texmf/tex/latex/psnfss/upzd.fd)
(/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
fstartlink.
<to be read again>
\endgroup
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