You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dimen \XeTeXLinkMargin defined for all engines but apparently only needed for XeTeX #240
Looking at some log file I noticed a dimen register was allocated with name \XeTeXLinkMargin.
I looked into hyperref.sty and found this:
\newdimen\XeTeXLinkMargin\setlength{\XeTeXLinkMargin}{2pt}
\ifxetex\font\XeTeXLink@font=pzdr at 1sp\relax
...
\else\newcommand*{\XeTeXLinkBox}[1]{%\begingroup\leavevmode\sbox\z@{#1}%\copy\z@\endgroup
}%\fi
which seems to indicate it is is needed only for XeTeX engine. I did not find other references in the code and the documentation 7.7 \XeTeXLinkBox mentions it as XeTeX-specific thing.
I don't know if it's the original reason but if you only conditionally allocate then all box logging shows different box numbers for any later allocated boxes in xetex which complicates testing engine neutral code
Well it is only needed for xetex, but defining it for the other engines too makes it easier for the users: they don't have to test for the engine but can simply add the box and set the dimen.
Activity
davidcarlisle commentedon May 24, 2022
I don't know if it's the original reason but if you only conditionally allocate then all box logging shows different box numbers for any later allocated boxes in xetex which complicates testing engine neutral code
u-fischer commentedon May 24, 2022
Well it is only needed for xetex, but defining it for the other engines too makes it easier for the users: they don't have to test for the engine but can simply add the box and set the dimen.