\pdfextension startlink / endlink and boxing level problems
(A similar question has been sent to the tex live list for pdftex) After some discussion in the latex team I have two questions about \pdfextension startlink/endlink in luatex and boxing levels. 1. Currently the commands give a fatal error if used in different boxing levels: x\hbox{\pdfextension startlink attr {/Border[0 0 1]} user{ /Subtype/Link% /A<<% /Type/Action% /S/URI% /URI(blkub)% >>% } Linktext} \pdfextension endlink \bye ! error: (pdf backend): 'endlink' ended up in different nesting level than 'startlink' ! ==> Fatal error occurred, no output PDF file produced! This doesn't happen very often in documents, but if the galley is split and reboxed it is possible that long links end in different levels. One example involving two column mode and top floats has been discussed on the latex2e github: https://github.com/latex3/latex2e/issues/94 Is the fatal error really sensible here? Couldn't the engine close the last annotation with some more or less sensible coordinate and continue with a warning? A pdf with a wrong link area seems better than no pdf at all (and would release formats and packages from the need to carefully keep track of boxing levels when splitting and reassembling stuff). 2. The engine interrupts linking if the boxing level of intermediate text is less than the boxing level at the start of the link: x\hbox{\hbox{\pdfextension startlink attr {/Border[0 0 1]} user{ /Subtype/Link% /A<<% /Type/Action% /S/URI% /URI(blkub)% >>% } Linktext}} not linked \hbox{\hbox{still not linked} \hbox{\hbox{more Linktext\pdfextension endlink}} \bye This allows to some extend to exclude e.g. header and footer from link areas. But doesn't work e.g. with the latex package fancyhdr which adds an additional box level to the footer. xetex/xdvidfpmx has here a quite useful special \special{pdf:nolink} which can be used to suppress the unwanted link area: \documentclass[a4paper]{article} \usepackage{fancyhdr} \pagestyle{fancy} \cfoot{some longer text that should not be linked} \usepackage{ifxetex} \ifxetex %\cfoot{\special{pdf:nolink}some longer text that should not be linked\special{pdf:link}} \fi \usepackage{hyperref} \begin{document} \vspace*{48\baselineskip} xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx \href{xxxxx}{link link link link } \end{document} Would it be possible to add to luatex something similar? -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 12/1/2018 3:39 PM, Ulrike Fischer wrote:
(A similar question has been sent to the tex live list for pdftex) Would it be possible to add to luatex something similar? very unlikely ... it's something that the macro package should deal with (as as you mention, it's something that has been so right from the start of pdftex and nesting has been discussed at that time and rejected)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Ulrike Fischer