[dvipdfmx] missing annotation rectangle if the box contains no glyph

Shunsaku Hirata shunsaku.hirata74 at gmail.com
Tue Jun 23 16:46:25 CEST 2020


> > Here, dvipdfmx can only guess the horizontal extent from the "right3"
> > DVI command. So dvipdfmx can't determine the size of annotation.
>
> You mean it can't get the height and depth? Yes I understand this.
> But couldn't it in such cases assume say 10pt?

Yes, height and depth can't be determined. It is possible to use some
predefined height and depth as default but I'm not sure what value is
adequate. Also, using current font size may not work, as indicated by
the example where \Huge is inserted before the phantom text.

My other concern is that there is no way for dvipdfmx to decide whether
a horizontal space is due to a phantom text which should be considered
as part of annotation. For example, the first-line indent of paragraph may
appear after the \special{pdf:bann} command (DVI instruction "xxx"):

  \documentclass[]{article}
  \begin{document}
  \special{pdf:bann}Hello\special{pdf:eann}
  \end{document}

In this case, the horizontal space within the bann-eann block should be
ignored.

> And couldn't there be a special that would allow to define the sizes in such
> cases so that one doesn't have to resort to inject hidden glyphs?
>
> E.g. if I do this:
>
> Some \special{pdf:bann}{\special{pdf:bannstrut height 20pt depth 3pt}%
>  \Huge\phantom{text}}\special{pdf:eann} goes here

But the original problem was when using hyperref package:

  \hyperlink{name}{\phantom{text}}text

Then, hyperref needs to automatically adjust special commands it generates
according to the text in \hyperlink{}?


Thanks,
Shunsaku Hirata


More information about the dvipdfmx mailing list.