summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/orcidlink
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-16 22:06:25 +0000
committerKarl Berry <karl@freefriends.org>2021-03-16 22:06:25 +0000
commitf2effa23ac78e40a3add9f09b6a9bce843941ce3 (patch)
tree3d360f607240118d492cc1ad08b410713478d4cb /Master/texmf-dist/tex/latex/orcidlink
parentc8201b3e2e25ed926de8a2f47e5d11fce62dc9b5 (diff)
orcidlink (16mar21)
git-svn-id: svn://tug.org/texlive/trunk@58432 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/orcidlink')
-rw-r--r--Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty22
1 files changed, 16 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty b/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty
index 20f8c86b1d2..15b7242306f 100644
--- a/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty
+++ b/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty
@@ -20,12 +20,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{orcidlink}
- [2020/11/21 v1.0.2 Linked ORCiD logo macro package]
+ [2021/03/15 v1.0.3 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
\RequirePackage{hyperref}
-\RequirePackage{scalerel}
\RequirePackage{tikz}
\ProcessOptions\relax
@@ -42,11 +41,22 @@
}
}
-\newcommand\orcidlink[1]{\texorpdfstring{\href{https://orcid.org/#1}{\mbox{\scalerel*{
-\begin{tikzpicture}[yscale=-1,transform shape]
+%% Reciprocal of the height of the svg whose source is above. The
+%% original generates a 256pt high graphic; this macro holds 1/256.
+\newcommand{\@OrigHeightRecip}{0.00390625}
+
+%% We will compute the current X height to make the logo the right height
+\newlength{\@curXheight}
+
+\DeclareRobustCommand\orcidlink[1]{%
+\texorpdfstring{%
+\setlength{\@curXheight}{\fontcharht\font`X}%
+\href{https://orcid.org/#1}{\mbox{%
+\begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight,
+xscale=\@OrigHeightRecip*\@curXheight,transform shape]
\pic{orcidlogo};
-\end{tikzpicture}
-}{|}}}}{}}
+\end{tikzpicture}%
+}}}{}}
\endinput
%%