diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/rorlink/README.md | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/rorlink/rorlink.pdf | bin | 234620 -> 228341 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/rorlink/rorlink.dtx | 83 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/rorlink/rorlink.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/rorlink/rorlink.sty | 48 |
5 files changed, 106 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/latex/rorlink/README.md b/Master/texmf-dist/doc/latex/rorlink/README.md index 763408ceae8..543a10375f7 100644 --- a/Master/texmf-dist/doc/latex/rorlink/README.md +++ b/Master/texmf-dist/doc/latex/rorlink/README.md @@ -1,12 +1,16 @@ # *RORLINK* – A LaTeX Package for Linking ROR's +*by Florian Lukas, florian.lukas@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. ## 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 diff --git a/Master/texmf-dist/doc/latex/rorlink/rorlink.pdf b/Master/texmf-dist/doc/latex/rorlink/rorlink.pdf Binary files differindex 072caf63bb4..9b9aa8d60ae 100644 --- a/Master/texmf-dist/doc/latex/rorlink/rorlink.pdf +++ b/Master/texmf-dist/doc/latex/rorlink/rorlink.pdf diff --git a/Master/texmf-dist/source/latex/rorlink/rorlink.dtx b/Master/texmf-dist/source/latex/rorlink/rorlink.dtx index 4e169fd1893..2a5daca2ef5 100644 --- a/Master/texmf-dist/source/latex/rorlink/rorlink.dtx +++ b/Master/texmf-dist/source/latex/rorlink/rorlink.dtx @@ -3,7 +3,7 @@ % Copyright (C) 2023 by Florian Lukas <florian.lukas@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,13 +26,14 @@ %<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> \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} % diff --git a/Master/texmf-dist/source/latex/rorlink/rorlink.ins b/Master/texmf-dist/source/latex/rorlink/rorlink.ins index dab31c558e1..bb08b231c74 100644 --- a/Master/texmf-dist/source/latex/rorlink/rorlink.ins +++ b/Master/texmf-dist/source/latex/rorlink/rorlink.ins @@ -1,7 +1,7 @@ %% Copyright (C) 2023 by Florian Lukas <florian.lukas@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 @@ This is a generated file. Copyright (C) 2023 by Florian Lukas <florian.lukas@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 diff --git a/Master/texmf-dist/tex/latex/rorlink/rorlink.sty b/Master/texmf-dist/tex/latex/rorlink/rorlink.sty index e34fa5e9506..e9937d98602 100644 --- a/Master/texmf-dist/tex/latex/rorlink/rorlink.sty +++ b/Master/texmf-dist/tex/latex/rorlink/rorlink.sty @@ -11,7 +11,7 @@ %% Copyright (C) 2023 by Florian Lukas <florian.lukas@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 @@ svg{M95.14,115.47L107.28,96.88L119.41,115.47L95.14,115.47Z}; } %% 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{#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{#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}% -}}}}{}} +}}}}{}% +\endgroup% +}{\PackageWarning{rorlink}{The defined optional argument is unknown, thus, set to blank.}{\rorlink{#2}}}% +}% +}% \endinput% \end{macrocode} \endinput |