From 50348339950e6aca379b6d0e9b08944ea974171f Mon Sep 17 00:00:00 2001 From: "Leo C. Stein" Date: Fri, 11 Jun 2021 09:02:34 -0500 Subject: [PATCH] Use XeTeXLinkBox to get hyperlink working correctly with XeTeX. Thanks to Tim Henke for the bug report. --- orcidlink.dtx | 10 ++++++---- orcidlink.sty | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/orcidlink.dtx b/orcidlink.dtx index 7f34baa..219fb44 100644 --- a/orcidlink.dtx +++ b/orcidlink.dtx @@ -40,7 +40,7 @@ % % \fi % -% \CheckSum{32} +% \CheckSum{33} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -65,6 +65,8 @@ % author, and combined with hyperref's option pdfusetitle} % \changes{v1.0.3}{2021/03/15}{Improve fragility by calculating % scaling ourselves, and using DeclareRobustCommand} +% \changes{v1.0.4}{2021/06/11}{Use XeTeXLinkBox to get hyperlink +% working correctly with XeTeX. Thanks to Tim Henke for the bug report.} % % \DoNotIndex{\newcommand,\newenvironment} % @@ -120,7 +122,7 @@ % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{orcidlink} - [2021/03/15 v1.0.3 Linked ORCiD logo macro package] + [2021/06/11 v1.0.4 Linked ORCiD logo macro package] %% All I did was package up Milo's code on TeX.SE, %% see https://tex.stackexchange.com/a/445583/34063 @@ -155,12 +157,12 @@ \DeclareRobustCommand\orcidlink[1]{% \texorpdfstring{% \setlength{\@curXheight}{\fontcharht\font`X}% -\href{https://orcid.org/#1}{\mbox{% +\href{https://orcid.org/#1}{\XeTeXLinkBox{\mbox{% \begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight, xscale=\@OrigHeightRecip*\@curXheight,transform shape] \pic{orcidlogo}; \end{tikzpicture}% -}}}{}} +}}}}{}} \endinput % \end{macrocode} diff --git a/orcidlink.sty b/orcidlink.sty index 15b7242..cfa2f7f 100644 --- a/orcidlink.sty +++ b/orcidlink.sty @@ -20,7 +20,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{orcidlink} - [2021/03/15 v1.0.3 Linked ORCiD logo macro package] + [2021/06/11 v1.0.4 Linked ORCiD logo macro package] %% All I did was package up Milo's code on TeX.SE, %% see https://tex.stackexchange.com/a/445583/34063 @@ -51,12 +51,12 @@ \DeclareRobustCommand\orcidlink[1]{% \texorpdfstring{% \setlength{\@curXheight}{\fontcharht\font`X}% -\href{https://orcid.org/#1}{\mbox{% +\href{https://orcid.org/#1}{\XeTeXLinkBox{\mbox{% \begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight, xscale=\@OrigHeightRecip*\@curXheight,transform shape] \pic{orcidlogo}; \end{tikzpicture}% -}}}{}} +}}}}{}} \endinput %%