texlive[71633] Master/texmf-dist: orcidlink (27jun24)
commits+karl at tug.org
commits+karl at tug.org
Thu Jun 27 21:27:10 CEST 2024
Revision: 71633
https://tug.org/svn/texlive?view=revision&revision=71633
Author: karl
Date: 2024-06-27 21:27:10 +0200 (Thu, 27 Jun 2024)
Log Message:
-----------
orcidlink (27jun24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/orcidlink/README.md
trunk/Master/texmf-dist/doc/latex/orcidlink/orcidlink.pdf
trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins
trunk/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty
Modified: trunk/Master/texmf-dist/doc/latex/orcidlink/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/orcidlink/README.md 2024-06-27 19:27:01 UTC (rev 71632)
+++ trunk/Master/texmf-dist/doc/latex/orcidlink/README.md 2024-06-27 19:27:10 UTC (rev 71633)
@@ -1,7 +1,14 @@
# orcidlink-LaTeX-command
LaTeX style file to add a macro for inserting a linked ORCiD logo
-This LaTeX style file just defines a single macro, `\orcidlink`. The code is from [this TeX.SE answer](https://tex.stackexchange.com/a/445583/34063). My contribution was wrapping it into a style file (and improving the fragility of the command a bit).
+This LaTeX style file defines `\orcidlink` and a few related macros.
+The code is from [this TeX.SE
+answer](https://tex.stackexchange.com/a/445583/34063). I wrapped it
+into a style file and improved the fragility of the command a bit.
+Later (at the suggestion of Hugo Heagren) we added the `\orcidlogo`
+command, and commands for the three recommended formats: full,
+compact, and inline, with commands `\orcidlinkf`, `\orcidlinkc`, and
+`\orcidlinki`.
Installation
------------
@@ -30,6 +37,14 @@
This will appear as a clickable hyperlink, and will look like this:

+If you simply want the ORCiD logo without a hyperlink anywhere, use
+`\orcidlogo`.
+
+ORCiD’s [guidelines](https://info.orcid.org/brand-guidelines/)
+recommend three formats: full, compact, and inline. The three formats
+are available, through `\orcidlinkf{orcid}`, `\orcidlinkc{orcid}`, and
+`\orcidlinki{Name}{orcid}`.
+
Dependancies and Compatibility
------------------------------
@@ -49,6 +64,6 @@
The original TikZ icon code was created by user [Milo on
TeX.SE](https://tex.stackexchange.com/users/128068/milo).
This package was created and is maintained by [Leo
-C. Stein](http://duetosymmetry.com/), (c) 2019-2023.
+C. Stein](http://duetosymmetry.com/), (c) 2019-2024.
This material is subject to the [LaTeX Project Public License
1.3c](https://www.ctan.org/license/lppl1.3).
Modified: trunk/Master/texmf-dist/doc/latex/orcidlink/orcidlink.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx 2024-06-27 19:27:01 UTC (rev 71632)
+++ trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx 2024-06-27 19:27:10 UTC (rev 71633)
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2019-2023 by Leo C. Stein <leo.stein at gmail.com>
+% Copyright (C) 2019-2024 by Leo C. Stein <leo.stein at gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -27,9 +27,12 @@
%<*driver>
\documentclass{ltxdoc}
\usepackage[dvipsnames]{xcolor}
-\usepackage{orcidlink}[2023/12/30]
-\hypersetup{colorlinks,urlcolor=NavyBlue,citecolor=NavyBlue,linkcolor=NavyBlue,pdfusetitle}
+\usepackage{orcidlink}[2024/06/25]
+\hypersetup{colorlinks,urlcolor=NavyBlue,citecolor=NavyBlue,linkcolor=NavyBlue}
+\hypersetup{pdftitle={The orcidlink package},pdfauthor={Leo C. Stein},
+ pdfsubject={-}}
\usepackage{graphicx}
+\usepackage{microtype}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -40,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{41}
+% \CheckSum{59}
%
% \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
@@ -69,6 +72,8 @@
% working correctly with XeTeX. Thanks to Tim Henke for the bug report.}
% \changes{v1.0.5}{2023/12/30}{Turn off TikZ externalization of logos.
% Thanks to github user aquileia for the bug report.}
+% \changes{v1.1.0}{2024/06/25}{Support ORCID's three different ID
+% formats. Thanks to Hugo Heagren for suggestions.}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -84,8 +89,10 @@
%
% \section{Introduction}
%
-% This is a LaTeX style file to add a macro for inserting a linked
-% ORCiD logo. The package provides exactly one command, |\orcidlink|.
+% This is a LaTeX style file providing a macro for inserting a
+% hyperlinked ORCiD logo. The package also provides three commands
+% for ORCiD's three recommended ID printing formats, and a command for
+% just the ORCiD logo, not linked to anything.
%
% \section{Usage}
%
@@ -113,6 +120,36 @@
% \includegraphics[width=0.5\textwidth]{preview}\newline{}
% The macro is used in the author line of this documentation as well.
%
+% \DescribeMacro{\orcidlogo}
+% If you simply want the ORCiD logo without a hyperlink anywhere, use
+% |\orcidlogo|.
+%
+% ORCiD's \href{https://info.orcid.org/brand-guidelines/}{guidelines}
+% recommend three formats: full, compact, and inline. The three
+% formats are available:
+% \begin{enumerate}
+% \item \DescribeMacro{\orcidlinkf\marg{orcid}} Full format. Example:
+% |\orcidlinkf{0000-0001-7559-9597}| will insert
+% \orcidlinkf{0000-0001-7559-9597}
+% \item \DescribeMacro{\orcidlinkc\marg{orcid}} Compact format.
+% Example: |\orcidlinkc{0000-0001-7559-9597}| will insert
+% \orcidlinkc{0000-0001-7559-9597}
+% \item \DescribeMacro{\orcidlinki\marg{Name}\marg{orcid}} Inline
+% format. Example: |\orcidlinki{Leo C. Stein}{0000-0001-7559-9597}|
+% will insert \orcidlinki{Leo C. Stein}{0000-0001-7559-9597}
+% \end{enumerate}
+%
+% \DescribeMacro{\orcidlinkX\marg{before}\marg{orcid}\marg{after}}
+%
+% The command |\orcidlinkX{before}{orcid}{after}| is a helper macro
+% that's used to implement all of the others. Though it is just an
+% internal helper, I saw no reason to keep it internal.
+% |\orcidlinkX{before}{orcid}{after}| results in
+% \orcidlinkX{before}{orcid}{after}. The entire output is hyperlinked
+% to the ORCiD page. There is a thin space |\,| between ``before,''
+% the logo, and ``after.'' However if ``before'' is empty, the space
+% will be omitted; similarly for ``after.''
+%
% \section{Package Compatibility}
%
% This package relies on \texttt{hyperref} and \texttt{tikz}. If you
@@ -132,10 +169,11 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{orcidlink}
- [2023/12/30 v1.0.5 Linked ORCiD logo macro package]
+ [2024/06/26 v1.1.0 Support ORCID's three different ID formats.]
-%% All I did was package up Milo's code on TeX.SE,
-%% see https://tex.stackexchange.com/a/445583/34063
+%% This started out as Milo's code on TeX.SE,
+%% see https://tex.stackexchange.com/a/445583/34063.
+%% It has since been expanded with more commands.
\RequirePackage{hyperref}
\RequirePackage{tikz}
@@ -168,19 +206,46 @@
% \end{macrocode}
%
-% \begin{macro}{\orcidlink}
+% \begin{macro}{\orcidlogo}
% \begin{macrocode}
-\DeclareRobustCommand\orcidlink[1]{%
+\newcommand{\orcidlogo}{%
\texorpdfstring{%
\setlength{\@curXheight}{\fontcharht\font`X}%
-\href{https://orcid.org/#1}{\XeTeXLinkBox{\mbox{%
+\XeTeXLinkBox{%
\@preventExternalization%
\begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight,
xscale=\@OrigHeightRecip*\@curXheight,transform shape]
\pic{orcidlogo};
\end{tikzpicture}%
-}}}}{}}
+}}{}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinkX}
+% \begin{macrocode}
+\DeclareRobustCommand\orcidlinkX[3]{\href{https://orcid.org/#2}{%
+\ifstrempty{#1}{}{#1\,}\orcidlogo\ifstrempty{#3}{}{\,#3}}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinkf}
+% \begin{macrocode}
+\newcommand{\orcidlinkf}[1]{\orcidlinkX{}{#1}{https://orcid.org/#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinkc}
+% \begin{macrocode}
+\newcommand{\orcidlinkc}[1]{\orcidlinkX{}{#1}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinki}
+% \begin{macrocode}
+\newcommand{\orcidlinki}[2]{\orcidlinkX{#1}{#2}{}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlink}
+% \begin{macrocode}
+\newcommand{\orcidlink}[1]{\orcidlinkX{}{#1}{}}
+
\endinput
% \end{macrocode}
% \end{macro}
Modified: trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins 2024-06-27 19:27:01 UTC (rev 71632)
+++ trunk/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins 2024-06-27 19:27:10 UTC (rev 71633)
@@ -1,4 +1,4 @@
-%% Copyright (C) 2019-2023 by Leo C. Stein <leo.stein at gmail.com>
+%% Copyright (C) 2019-2024 by Leo C. Stein <leo.stein at gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,7 +25,7 @@
This is a generated file.
-Copyright (C) 2019-2023 by Leo C. Stein <leo.stein at gmail.com>
+Copyright (C) 2019-2024 by Leo C. Stein <leo.stein at gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
Modified: trunk/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty 2024-06-27 19:27:01 UTC (rev 71632)
+++ trunk/Master/texmf-dist/tex/latex/orcidlink/orcidlink.sty 2024-06-27 19:27:10 UTC (rev 71633)
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2019-2023 by Leo C. Stein <leo.stein at gmail.com>
+%% Copyright (C) 2019-2024 by Leo C. Stein <leo.stein at gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,10 +20,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{orcidlink}
- [2023/12/30 v1.0.5 Linked ORCiD logo macro package]
+ [2024/06/26 v1.1.0 Support ORCID's three different ID formats.]
-%% All I did was package up Milo's code on TeX.SE,
-%% see https://tex.stackexchange.com/a/445583/34063
+%% This started out as Milo's code on TeX.SE,
+%% see https://tex.stackexchange.com/a/445583/34063.
+%% It has since been expanded with more commands.
\RequirePackage{hyperref}
\RequirePackage{tikz}
@@ -54,17 +55,24 @@
\tikzset{external/export next=false}\else\fi%
}
-\DeclareRobustCommand\orcidlink[1]{%
+\newcommand{\orcidlogo}{%
\texorpdfstring{%
\setlength{\@curXheight}{\fontcharht\font`X}%
-\href{https://orcid.org/#1}{\XeTeXLinkBox{\mbox{%
+\XeTeXLinkBox{%
\@preventExternalization%
\begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight,
xscale=\@OrigHeightRecip*\@curXheight,transform shape]
\pic{orcidlogo};
\end{tikzpicture}%
-}}}}{}}
+}}{}}
+\DeclareRobustCommand\orcidlinkX[3]{\href{https://orcid.org/#2}{%
+\ifstrempty{#1}{}{#1\,}\orcidlogo\ifstrempty{#3}{}{\,#3}}}
+\newcommand{\orcidlinkf}[1]{\orcidlinkX{}{#1}{https://orcid.org/#1}}
+\newcommand{\orcidlinkc}[1]{\orcidlinkX{}{#1}{#1}}
+\newcommand{\orcidlinki}[2]{\orcidlinkX{#1}{#2}{}}
+\newcommand{\orcidlink}[1]{\orcidlinkX{}{#1}{}}
+
\endinput
%%
%% End of file `orcidlink.sty'.
More information about the tex-live-commits
mailing list.