texlive[67461] Master/texmf-dist: rorlink (24jun23)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 24 22:00:04 CEST 2023


Revision: 67461
          http://tug.org/svn/texlive?view=revision&revision=67461
Author:   karl
Date:     2023-06-24 22:00:04 +0200 (Sat, 24 Jun 2023)
Log Message:
-----------
rorlink (24jun23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/rorlink/README.md
    trunk/Master/texmf-dist/doc/latex/rorlink/rorlink.pdf
    trunk/Master/texmf-dist/source/latex/rorlink/rorlink.dtx
    trunk/Master/texmf-dist/source/latex/rorlink/rorlink.ins
    trunk/Master/texmf-dist/tex/latex/rorlink/rorlink.sty

Modified: trunk/Master/texmf-dist/doc/latex/rorlink/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/rorlink/README.md	2023-06-24 19:59:55 UTC (rev 67460)
+++ trunk/Master/texmf-dist/doc/latex/rorlink/README.md	2023-06-24 20:00:04 UTC (rev 67461)
@@ -1,5 +1,7 @@
 # *RORLINK* – A LaTeX Package for Linking ROR's
 
+*by Florian Lukas, florian.lukas at dainst.de*
+
 This repo provides a LaTeX package to automatically create an inline [ROR](https://ror.org/)-symbol which links to a given ROR-institution.
 
 The code is derived mainly from the [Orcidlink package](https://github.com/duetosymmetry/orcidlink-LaTeX-command) by Leo Stein, which itself rests on the [Tex.SE answer](https://tex.stackexchange.com/questions/445563/ieeetran-how-to-include-orcid-in-tex-pdf-with-pdflatex/445583#445583) by the user Milo. My edits are only minor changes; especially the addition of the svg-path for the ROR symbol.
@@ -6,8 +8,10 @@
 
 ## Installation
 
-To use the package just copy the `rorlink.sty` file into your current LaTeX working directory. You also can copy it directly into your `texmf` tree. This may need **root** privileges.
+The package is official available on [CTAN](https://www.ctan.org/pkg/rorlink). It can be easily donwloaded there.
 
+Or copy the `rorlink.sty` file from GitLab into your current LaTeX working directory. You also can copy it directly into your `texmf` tree. This may need **root** privileges.
+
 ## Usage
 
 The usage is very simple. For example, just use:

Modified: trunk/Master/texmf-dist/doc/latex/rorlink/rorlink.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/rorlink/rorlink.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/rorlink/rorlink.dtx	2023-06-24 19:59:55 UTC (rev 67460)
+++ trunk/Master/texmf-dist/source/latex/rorlink/rorlink.dtx	2023-06-24 20:00:04 UTC (rev 67461)
@@ -3,7 +3,7 @@
 % Copyright (C) 2023 by Florian Lukas <florian.lukas at dainst.de>
 % ---------------------------------------------------------------------------
 % This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
 % of this license or (at your option) any later version.
 % The latest version of this license is in
 %   http://www.latex-project.org/lppl.txt
@@ -26,7 +26,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{rorlink}
 %<*package>
-    [2023/06/15 1.0.0 Linked ROR logo macro package]
+    [2023/06/23 1.1.0 Linked ROR logo macro package]
 %</package>
 %
 %<*driver>
@@ -33,6 +33,7 @@
 \documentclass{ltxdoc}
 \usepackage{rorlink}[2023/06/15]
 \usepackage{orcidlink}
+\usepackage{xurl}
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -44,7 +45,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{31}
+% \CheckSum{62}
 %
 % \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
@@ -64,6 +65,7 @@
 %
 %
 % \changes{1.0.0}{2023/06/15}{Build documentation and sty}
+% \changes{1.1.0}{2023/06/23}{Updated command syntax and implementation of optional arguments for a black and white logo}
 %
 % \DoNotIndex{\newcommand,\newenvironment}
 %
@@ -98,13 +100,24 @@
 %
 %Furthermore, it can be included into larger macros; for instance, to create an author section with all necessary informations of the contributors:
 %
-%\includegraphics[width=0.7\textwidth]{example_authorsection.png}
 %
-% \section{Required Packages}
+%
+%\section{Optional Arguments}
+%
+%There are two possibilities of using an optional argument |blackwhite|
+%
+%\DescribeMacro{\usepackage[blackwhite]{rorlink}}\par
+%The option |blackwhite| can be set globally in the praeambel. Then every ROR link will appear in black and white only.
+%
+%\DescribeMacro{\rorlink[blackwhite]\marg{ror-link}}\par
+%The option |blackwhite| can be set as argument if you use the |\rorlink| macro inline. Then only the current symbol will appear in black and white.
+%
+%\section{Required Packages}
 % 
 %\begin{description}
 %	\item[hyperref] Needed to use the symbol as a link to the particular ROR webpage.
 %	\item[tikz] Is used to draw the ROR symbol using the svg-path method and process the image, when the |\rorlink| command is called. 
+%	\item[etoolbox] For the conditioning of the optional argument uses in inline commands.
 %\end{description}
 %
 % \StopEventually{}
@@ -115,15 +128,28 @@
 %<*package>
 % \fi
 %
-%% The code is derived mainly from the orcidlink package https://github.com/duetosymmetry/orcidlink-LaTeX-command
+%% Required packages
 %    \begin{macrocode}
 \RequirePackage{hyperref}
 \RequirePackage{tikz}
+\RequirePackage{xparse}
+\RequirePackage{etoolbox}
+%    \end{macrocode}
+%% Set standard color of the ROR institution
+%	\begin{macrocode}
+\definecolor{rorlogocol}{HTML}{53BAA1}
+%	\end{macrocode}
+%% Set global option |blackwhite| for depicting the logo only in black and white.
+%	\begin{macrocode}
+\DeclareOption{blackwhite}{\definecolor{rorlogocol}{HTML}{000000}}
+\DeclareOption*{\PackageWarning{rorlink}{Unknown option -- \CurrentOption --}}
 \ProcessOptions\relax
+%    \end{macrocode}
+%% Load tikz library for processing svg-paths.
+%	\begin{macrocode}
 \usetikzlibrary{svg.path}
-\definecolor{rorlogocol}{HTML}{53BAA1}
 %    \end{macrocode}
-%% The original svg-path received from the file https://raw.githubusercontent.com/ror-community/ror-logos/main/ror-icon-rgb.svg
+%% The original svg-path received from the file \url{https://raw.githubusercontent.com/ror-community/ror-logos/main/ror-icon-rgb.svg}
 %    \begin{macrocode}
 \tikzset{
 	rorlogo/.pic={
@@ -136,25 +162,42 @@
 }
 %    \end{macrocode}
 %
-% \begin{macro}{\@OrigHeightRecipROR}
+% 
 %% The original height of the svg file is 119.27pt. The macro here uses 1/119.27 as unit.
 %    \begin{macrocode}
 \newcommand{\@OrigHeightRecipROR}{0.008384338}
 %    \end{macrocode}
-% \end{macro}
+% 
 %
-%% The logo is adjusted to the used font size
+%% The logo is adjusted to the used font size and an optional option |blackwhite| for depicting the logo in only black and white colors is set.
 %    \begin{macrocode}
 \newlength{\@curXheightROR}
-\DeclareRobustCommand\rorlink[1]{%
-\texorpdfstring{%
-\setlength{\@curXheightROR}{\fontcharht\font`X}%
-\href{#1}{\XeTeXLinkBox{\mbox{%
-\begin{tikzpicture}[yscale=-\@OrigHeightRecipROR*\@curXheightROR,
-xscale=\@OrigHeightRecipROR*\@curXheightROR,transform shape]
-\pic{rorlogo};
-\end{tikzpicture}%
-}}}}{}}
+\DeclareDocumentCommand\rorlink{om}{%
+	\IfNoValueTF{#1}{%
+		\texorpdfstring{%
+			\setlength{\@curXheightROR}{\fontcharht\font`X}%
+			\href{#2}{\XeTeXLinkBox{\mbox{%
+						\begin{tikzpicture}[yscale=-\@OrigHeightRecipROR*\@curXheightROR,%
+							xscale=\@OrigHeightRecipROR*\@curXheightROR,transform shape]%
+							\pic{rorlogo};%
+						\end{tikzpicture}%
+		}}}}{}%
+	}{%
+		\ifstrequal{#1}{blackwhite}{%
+		\begingroup%
+			\definecolor{rorlogocol}{HTML}{000000}
+			\texorpdfstring{%
+				\setlength{\@curXheightROR}{\fontcharht\font`X}%
+				\href{#2}{\XeTeXLinkBox{\mbox{%
+					\begin{tikzpicture}[yscale=-\@OrigHeightRecipROR*\@curXheightROR,%
+						xscale=\@OrigHeightRecipROR*\@curXheightROR,transform shape]%
+						\pic{rorlogo};%
+					\end{tikzpicture}%
+			}}}}{}%
+		\endgroup%
+		}{\PackageWarning{rorlink}{The defined optional argument is unknown, thus, set to blank.}{\rorlink{#2}}}%
+	}%
+}%
 \endinput%    \end{macrocode}
 
 %

Modified: trunk/Master/texmf-dist/source/latex/rorlink/rorlink.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/rorlink/rorlink.ins	2023-06-24 19:59:55 UTC (rev 67460)
+++ trunk/Master/texmf-dist/source/latex/rorlink/rorlink.ins	2023-06-24 20:00:04 UTC (rev 67461)
@@ -1,7 +1,7 @@
 %% Copyright (C) 2023 by Florian Lukas <florian.lukas at dainst.de>
 %% --------------------------------------------------------------------------
 %% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
 %% of this license or (at your option) any later version.
 %% The latest version of this license is in
 %%   http://www.latex-project.org/lppl.txt
@@ -28,7 +28,7 @@
 Copyright (C) 2023 by Florian Lukas <florian.lukas at dainst.de>
 --------------------------------------------------------------------------
 This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
 of this license or (at your option) any later version.
 The latest version of this license is in
   http://www.latex-project.org/lppl.txt

Modified: trunk/Master/texmf-dist/tex/latex/rorlink/rorlink.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/rorlink/rorlink.sty	2023-06-24 19:59:55 UTC (rev 67460)
+++ trunk/Master/texmf-dist/tex/latex/rorlink/rorlink.sty	2023-06-24 20:00:04 UTC (rev 67461)
@@ -11,7 +11,7 @@
 %% Copyright (C) 2023 by Florian Lukas <florian.lukas at dainst.de>
 %% --------------------------------------------------------------------------
 %% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
 %% of this license or (at your option) any later version.
 %% The latest version of this license is in
 %%   http://www.latex-project.org/lppl.txt
@@ -20,14 +20,21 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{rorlink}
-    [2023/06/15 1.0.0 Linked ROR logo macro package]
-%% The code is derived mainly from the orcidlink package https://github.com/duetosymmetry/orcidlink-LaTeX-command
+    [2023/06/23 1.1.0 Linked ROR logo macro package]
+%% Required packages
 \RequirePackage{hyperref}
 \RequirePackage{tikz}
+\RequirePackage{xparse}
+\RequirePackage{etoolbox}
+%% Set standard color of the ROR institution
+\definecolor{rorlogocol}{HTML}{53BAA1}
+%% Set global option |blackwhite| for depicting the logo only in black and white.
+\DeclareOption{blackwhite}{\definecolor{rorlogocol}{HTML}{000000}}
+\DeclareOption*{\PackageWarning{rorlink}{Unknown option -- \CurrentOption --}}
 \ProcessOptions\relax
+%% Load tikz library for processing svg-paths.
 \usetikzlibrary{svg.path}
-\definecolor{rorlogocol}{HTML}{53BAA1}
-%% The original svg-path received from the file https://raw.githubusercontent.com/ror-community/ror-logos/main/ror-icon-rgb.svg
+%% The original svg-path received from the file \url{https://raw.githubusercontent.com/ror-community/ror-logos/main/ror-icon-rgb.svg}
 \tikzset{
 rorlogo/.pic={
 \fill[rorlogocol] svg{M68.65,4.16L56.52,22.74L44.38,4.16L68.65,4.16Z}
@@ -39,17 +46,34 @@
 }
 %% The original height of the svg file is 119.27pt. The macro here uses 1/119.27 as unit.
 \newcommand{\@OrigHeightRecipROR}{0.008384338}
-%% The logo is adjusted to the used font size
+%% The logo is adjusted to the used font size and an optional option |blackwhite| for depicting the logo in only black and white colors is set.
 \newlength{\@curXheightROR}
-\DeclareRobustCommand\rorlink[1]{%
+\DeclareDocumentCommand\rorlink{om}{%
+\IfNoValueTF{#1}{%
 \texorpdfstring{%
 \setlength{\@curXheightROR}{\fontcharht\font`X}%
-\href{#1}{\XeTeXLinkBox{\mbox{%
-\begin{tikzpicture}[yscale=-\@OrigHeightRecipROR*\@curXheightROR,
-xscale=\@OrigHeightRecipROR*\@curXheightROR,transform shape]
-\pic{rorlogo};
+\href{#2}{\XeTeXLinkBox{\mbox{%
+\begin{tikzpicture}[yscale=-\@OrigHeightRecipROR*\@curXheightROR,%
+xscale=\@OrigHeightRecipROR*\@curXheightROR,transform shape]%
+\pic{rorlogo};%
 \end{tikzpicture}%
-}}}}{}}
+}}}}{}%
+}{%
+\ifstrequal{#1}{blackwhite}{%
+\begingroup%
+\definecolor{rorlogocol}{HTML}{000000}
+\texorpdfstring{%
+\setlength{\@curXheightROR}{\fontcharht\font`X}%
+\href{#2}{\XeTeXLinkBox{\mbox{%
+\begin{tikzpicture}[yscale=-\@OrigHeightRecipROR*\@curXheightROR,%
+xscale=\@OrigHeightRecipROR*\@curXheightROR,transform shape]%
+\pic{rorlogo};%
+\end{tikzpicture}%
+}}}}{}%
+\endgroup%
+}{\PackageWarning{rorlink}{The defined optional argument is unknown, thus, set to blank.}{\rorlink{#2}}}%
+}%
+}%
 \endinput%    \end{macrocode}
 
 \endinput



More information about the tex-live-commits mailing list.