summaryrefslogtreecommitdiff
path: root/systems/doc/pdftex/tests/15-startlink-boxing/test-different-levels.tex
diff options
context:
space:
mode:
Diffstat (limited to 'systems/doc/pdftex/tests/15-startlink-boxing/test-different-levels.tex')
-rw-r--r--systems/doc/pdftex/tests/15-startlink-boxing/test-different-levels.tex47
1 files changed, 47 insertions, 0 deletions
diff --git a/systems/doc/pdftex/tests/15-startlink-boxing/test-different-levels.tex b/systems/doc/pdftex/tests/15-startlink-boxing/test-different-levels.tex
new file mode 100644
index 0000000000..2d9772a2ed
--- /dev/null
+++ b/systems/doc/pdftex/tests/15-startlink-boxing/test-different-levels.tex
@@ -0,0 +1,47 @@
+% $Id: test-different-levels.tex 831 2020-06-04 18:07:54Z karl $
+% Public domain.
+
+\catcode`\{=1 \catcode`\}=2 \pdfoutput=1
+
+x\hbox{\pdfstartlink
+ attr {/Border[0 0 1]}
+ user{
+ /Subtype/Link%
+ /A<<%
+ /Type/Action%
+ /S/URI%
+ /URI(foo)%
+ >>%
+ } Linktext}
+\pdfendlink
+\end
+
+% https://tug.org/pipermail/tex-live/2018-November/042759.html
+% Date: Wed, 28 Nov 2018 12:31:25 +0100
+% From: Ulrike Fischer <news3@nililand.de>
+% To: tex-live@tug.org
+% Subject: [tex-live] pdfstartlink/pdfendlink and boxing level problems
+%
+% 1. Currently the commands give a fatal error if used in different
+% boxing levels:
+%
+% [example program above]
+%
+% ! pdfTeX error (ext4): \pdfendlink ended up in different nesting
+% level than \pdfstartlink.
+% ! ==> 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 engines 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 the format and packages from
+% the need to carefully keep track of boxing levels when splitting and
+% reassembling stuff).
+%
+% [see ../16-nolink-special/*.tex for other request.]