[dvipdfmx] missing annotation rectangle if the box contains no glyph
Shunsaku Hirata
shunsaku.hirata74 at gmail.com
Mon Jun 22 23:27:43 CEST 2020
Hi,
> hyperref has a special command which inserts a small glyph to force
> a non-zero rectangle, but I wonder if dvipdfmx could be adjusted to
> avoid this work-around.
In some situations dvipdfmx can't determine the extent of the box to be
used for annotation reliably.
Consider the following example:
\documentclass[dvipdfmx]{article}
\begin{document}
Some \special{pdf:bann}{\Huge\phantom{text}}\special{pdf:eann} goes here
\end{document}
To inspect the actual DVI output of latex, output of dvitype command
can be used:
...
139: setchar101 h:=6284178+291271=6575449, hh:=417
140: w3 218453 h:=6575449+218453=6793902, hh:=430
[Some ]
144: xxx 'pdf:bann'
154: right3 1146883 h:=6793902+1146883=7940785, hh:=503
[ ]
158: xxx 'pdf:eann'
168: w0 218453 h:=7940785+218453=8159238, hh:=517
169: setchar103 h:=8159238+327681=8486919, hh:=538
...
Here, dvipdfmx can only guess the horizontal extent from the "right3"
DVI command. So dvipdfmx can't determine the size of annotation.
Thanks,
Shunsaku Hirata
2019年9月16日(月) 23:51 Ulrike Fischer <news3 at nililand.de>:
>
> As been discussed in a hyperref issue
> https://github.com/ho-tex/hyperref/issues/16 the pdf:bann and pdf:eann
> specials for creating line-breakable PDF annotations require typeset
> glyphs in between to compute a non-zero annotation rectangle.
>
> hyperref has a special command which inserts a small glyph to force
> a non-zero rectangle, but I wonder if dvipdfmx could be adjusted to
> avoid this work-around.
>
>
> \documentclass{article}
> \usepackage{hyperref}
>
> \begin{document}
>
> \hypertarget{name}{text} \hypertarget{name2}{text}
> \clearpage
> \hyperlink{name}{\phantom{text}}text
>
> \hyperlink{name2}{\XeTeXLinkBox{\phantom{text}}}text2
>
> \end{document}
>
>
>
> --
> Mit freundlichen Grüßen
> Ulrike Fischer
>
>
More information about the dvipdfmx
mailing list.