Last active
April 18, 2016 17:48
-
-
Save vermiculus/178fcf77764e53fdf3c0cde73779e4c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\cs_new_protected:Npn \__npkg_package:nnn #1#2#3 | |
{ | |
\texorpdfstring | |
{ | |
\bool_if:nTF {#1} | |
{ \__npkg_package_format:n {#3} } | |
{ \href {#2} { \__npkg_package_format:n {#3} } } | |
} | |
{#3} | |
} | |
\cs_new_protected:Npn \__npkg_package:nn #1#2 | |
{ \__npkg_package:nnn {#1} { \c__npkg_standard_url_str #2 } {#2} } | |
\NewDocumentCommand {\package} {sO{}m} | |
{ | |
\IfValueTF {#2} { \__npkg_package:nnn {#1} {#2} {#3} } | |
{ \__npkg_package:nn {#1} {#3} } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment