[ pdftex-Bugs-479 ] Nested links
Bugs item #479, was opened at 2006-02-09 17:08 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=479&group_id=106 Category: Annotations Group: v1.30.0 Status: Open Resolution: Accepted Priority: 5 Submitted By: Heiko Oberdiek (oberdiek) Assigned to: Hartmut Henkel (hhenkel) Summary: Nested links Initial Comment: Hello, Dario Teixeira reported a problem on the pdfTeX mailing list:
I have come across an interesting issue with hyperref and pdftex. Whenever one hyperlink is nested inside another, the entire remainder of the line is shown as an hyperlink.
If you are wondering why on earth would someone want to have nested hyperlinks, please take a look at this sample document I created; it also displays the "feature": http://www.dse.nl/~dario/misc/nestedlinks.pdf [50KB]
I consider this as bug in pdfTeX and have generated a small test file (plain format): \showboxbreadth=\maxdimen \showboxdepth=\maxdimen [part before] \pdfstartlink goto name{Hello} [hello start \pdfstartlink attr{/C[1 0 0]} goto name{World} [inside world]% \pdfendlink\space stop]% \pdfendlink\space [part after]\par \showlists \vfill\eject \pdfdest name{Hello}XYZ\relax Hello \vfill\eject \pdfdest name{World}XYZ\relax World \end Three annotations are generated by pdfTeX 1.30.4: 7 0 obj << /Type /Annot /Rect [148.989 757.436 540 767.399] /Subtype /Link /A << /S /GoTo /D (Hello) >>
endobj 8 0 obj << /Type /Annot /C[1 0 0] /Rect [199.439 757.436 257.361 767.399] /Subtype /Link /A << /S /GoTo /D (World) >> endobj 9 0 obj << /Type /Annot /Rect [257.361 757.436 281.769 767.399] /Subtype /Link /A << /S /GoTo /D (Hello) >> endobj
Either there should be two overlapping
annotations or three distinct ones.
At any case "540" in the first rect is too large.
As workaround, the outer/enclosing annotation
can put into a box (\hbox in plain TeX, \mbox
in LaTeX). But it does not solve the problem,
because now the link cannot be broken across
lines.
Therefore the algorithm for annotations needs
to be reviewed and corrected.
Yours sincerely
Heiko
Comment By: The Thanh Han (hanthethanh) Date: 2006-10-11 09:21
Message: Logged In: YES user_id=710 This is an attempt to fix bug #479 - This patch applies to the pristine pdftex-1.40.0-beta-20060928 sources only; if you have applied another patch(es) to the sources, please discard them and start from the fresh ones. - How to apply: ,-------- | cd /path/to/pdftex-1.40.0-beta-20060928/src | cat /path/to/the/patch | patch -p1 | ./configure | cd texk/web2c | make pdftex `-------- - Example is included in the zip archive. ---------------------------------------------------------------------- Comment By: Martin Schröder (oneiros) Date: 2006-02-12 23:07 Message: Logged In: YES user_id=421 Confirmed with the latest beta. _Can_ links be nested? And if they can, is there a limit on the nesting depth? ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=479&group_id=106
participants (1)
-
noreply@sarovar.org