ho-tex / oberdiek

Updating the oberdiek bundle
Other
16 stars 6 forks source link

atenddvi also triggers "\pdfendlink ended up in different nesting level than \pdfstartlink" error #83

Closed urrameu closed 4 years ago

urrameu commented 4 years ago

Hi,

In a document with a hyperlink that gets divided by a page break, loading the atenddvi package prevents compilation with the "\pdfendlink ended up in different nesting level than \pdfstartlink" message (it takes two runs to actually crash). This affects, for example, the hyperxmp package.

There is some similarity with this bug: latex3/latex2e/issues/94 , but they are not the same.

A MWE (based on the MWE of that bug):

\documentclass{article}
\usepackage{atenddvi}
\usepackage{hyperref}

\begin{document}
\null\kern.95\textheight

\href{http://tex.stackexchange.com}{This is a very very
  very very very very very very very very very very very very very
  very very very very very very very very long link.}
\end{document}
urrameu commented 4 years ago

I just realized: this only happens if the divided link is present in the last page.

u-fischer commented 4 years ago

Yes, this is known. \AtEndDvi adds an additional box to the last page and this means that divided links have different box levels. See https://github.com/ho-tex/atenddvi/issues/1. We are currently working on a replacement.

That hyperxmp is affected by this is a bug in hyperxmp: it tests for pdftex by checking \Hy@driver but seems to forget that hyperref should be loaded after hyperxmp so \Hy@driver is undefined and the test always false. Report this to the author. The package should better use the iftex package and check for pdf mode or delay the test.

I'm closing because of the duplicate.