I use hyperref
with the optional argument breaklinks=true
.
I later wanted to inlcude kpfonts via:
\usepackage{kpfonts}
\usepackage[T1]{fontenc}
What I got after compiling was the following error message:
! pdfTeX error (ext4): \pdfendlink ended up in different nesting level than \pd fstartlink. \AtBegShi@Output ...ipout \box \AtBeginShipoutBox
\fi \fi
l.278
! ==> Fatal error occurred, no output PDF file produced! Transcript written on pirates.log. texify: pdflatex failed for some reason (see log file).
When I put all the existing references in my .tex-file into a box (for example by framing them in a \fbox{}
then the compiler did his job, but (of course) without breaking the links.
Has anybody an idea what the problem might be? (I hope the part of the error-code I posted is sufficient...)
\documentclass{...}
and ending with\end{document}
. — The usual rule (with its exceptions) is: Loadhyperref
last. From what you say in your question, it seems you load it before other packages. This has often created issues in the past. A MWE would surely help to sorten that out.draft
-mode (given as optional argument in\documentclass[]{scrbook}
) caused the compiling failure. Withdraft
"turned off" everything goes just fine... @HeikoOberdiek: Thought about that too. Is there a general way to prevent that links are broken across pages?draft
is the problem?draft
disableshyperref
's links. 2) There is not a general way to prevent links that are broken across pages.