summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/orcidlink
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-11-21 21:44:46 +0000
committerKarl Berry <karl@freefriends.org>2020-11-21 21:44:46 +0000
commiteb1a6fc7a1b751c8311403b76cbe4a8222687146 (patch)
tree0112ed76f6c33789a2269f729bd5657b1336146a /Master/texmf-dist/source/latex/orcidlink
parente69cf6223177464846d0da92465be590f10f6d80 (diff)
orcidlink (21nov20)
git-svn-id: svn://tug.org/texlive/trunk@56976 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/orcidlink')
-rw-r--r--Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx40
1 files changed, 22 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx b/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
index 2d6a65fbd8b..016d225d0c4 100644
--- a/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
+++ b/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
@@ -23,16 +23,11 @@
%<*driver>
\ProvidesFile{orcidlink.dtx}
%</driver>
-%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<package>\ProvidesPackage{orcidlink}
-%<*package>
- [2020/11/19 v1.0.0 Linked ORCiD logo macro package]
-%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage[dvipsnames]{xcolor}
-\usepackage{orcidlink}[2020/11/19]
+\usepackage{orcidlink}[2020/11/21]
\hypersetup{colorlinks,urlcolor=NavyBlue,citecolor=NavyBlue,linkcolor=NavyBlue,pdfusetitle}
\usepackage{graphicx}
\EnableCrossrefs
@@ -45,7 +40,7 @@
%</driver>
% \fi
%
-% \CheckSum{21}
+% \CheckSum{22}
%
% \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,10 +60,13 @@
%
%
% \changes{v1.0.0}{2020/11/19}{Converted to DTX file}
+% \changes{v1.0.1}{2020/11/21}{Bugfix due to misunderstanding of docstrip}
+% \changes{v1.0.2}{2020/11/21}{Fix fragility of command when inside of
+% author, and combined with hyperref's option pdfusetitle}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
-% \GetFileInfo{orcidlink.dtx}
+% \GetFileInfo{orcidlink.sty}
% \title{The \textsf{orcidlink} package}
% \author{Leo C.\ Stein\,\orcidlink{0000-0001-7559-9597} \\ \href{mailto:leo.stein@gmail.com}{leo.stein@gmail.com}}
% \date{\fileversion~from \filedate}
@@ -87,13 +85,14 @@
%
% To use this package, in the preamble include
% \begin{macrocode}
-\usepackage{orcidlink}
+% \usepackage{orcidlink}
% \end{macrocode}
+%
% \DescribeMacro{\orcidlink}
% Insert the ORCiD logo (\orcidlink{}), which is hyperlinked to the URL
% of the researcher whose iD was specified. Usage:
%
-|\orcidlink| \marg{orcid}\newline
+% |\orcidlink| \marg{orcid}\newline
% Replace the mandatory argument \meta{orcid} with your
% ORCiD --- just the digits, not your whole URL.
% For example, the command
@@ -103,7 +102,7 @@
% the author list. For example, in the preamble of a RevTeX article,
% if you write
% \begin{macrocode}
-\author{Emmy Noether\,\orcidlink{0000-0000-0000-0000}}
+% \author{Emmy Noether\,\orcidlink{0000-0000-0000-0000}}
% \end{macrocode}
% then the article byline will look something like this:
%
@@ -120,16 +119,19 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{orcidlink}[2019/12/12 Linked ORCiD logo macro package]
-% \end{macrocode}
-% All I did was package up Milo's code on TeX.SE,
-% see https://tex.stackexchange.com/a/445583/34063
-% \begin{macrocode}
+\ProvidesPackage{orcidlink}
+ [2020/11/21 v1.0.2 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
+
\usetikzlibrary{svg.path}
+
\definecolor{orcidlogocol}{HTML}{A6CE39}
\tikzset{
orcidlogo/.pic={
@@ -143,11 +145,13 @@
%
% \begin{macro}{\orcidlink}
% \begin{macrocode}
-\newcommand\orcidlink[1]{\href{https://orcid.org/#1}{\mbox{\scalerel*{
+
+\newcommand\orcidlink[1]{\texorpdfstring{\href{https://orcid.org/#1}{\mbox{\scalerel*{
\begin{tikzpicture}[yscale=-1,transform shape]
\pic{orcidlogo};
\end{tikzpicture}
-}{|}}}}
+}{|}}}}{}}
+
\endinput
% \end{macrocode}
% \end{macro}