diff options
author | Norbert Preining <norbert@preining.info> | 2024-01-10 03:03:23 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-01-10 03:03:23 +0000 |
commit | cdb8117b8f1ac752d1927b82759c5be9f0ec0ab5 (patch) | |
tree | ebd07d36ab12076de3523b744cc87f975747f3e0 /macros/latex/contrib/href-ul | |
parent | 140e2f7f1509acd423172e2895d0d7839e5b88c6 (diff) |
CTAN sync 202401100303
Diffstat (limited to 'macros/latex/contrib/href-ul')
-rw-r--r-- | macros/latex/contrib/href-ul/DEPENDS.txt | 18 | ||||
-rw-r--r-- | macros/latex/contrib/href-ul/LICENSE.txt | 2 | ||||
-rw-r--r-- | macros/latex/contrib/href-ul/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/href-ul/href-ul.dtx | 46 | ||||
-rw-r--r-- | macros/latex/contrib/href-ul/href-ul.ins | 4 | ||||
-rw-r--r-- | macros/latex/contrib/href-ul/href-ul.pdf | bin | 283808 -> 300457 bytes |
6 files changed, 61 insertions, 11 deletions
diff --git a/macros/latex/contrib/href-ul/DEPENDS.txt b/macros/latex/contrib/href-ul/DEPENDS.txt index ba572a3763..3712b603b2 100644 --- a/macros/latex/contrib/href-ul/DEPENDS.txt +++ b/macros/latex/contrib/href-ul/DEPENDS.txt @@ -1,2 +1,18 @@ -hard ulem hard hyperref +hard ulem +hard pgfopts +soft docshots +soft environ +soft etoolbox +soft href-ul +soft hypdoc +soft l3build +soft libertine +soft mathtools +soft microtype +soft pdfcrop +soft pgf +soft pgfopts +soft scheme-basic +soft tools +soft xetex diff --git a/macros/latex/contrib/href-ul/LICENSE.txt b/macros/latex/contrib/href-ul/LICENSE.txt index bd949ffdab..1f211e0287 100644 --- a/macros/latex/contrib/href-ul/LICENSE.txt +++ b/macros/latex/contrib/href-ul/LICENSE.txt @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2021-2022 Yegor Bugayenko +Copyright (c) 2021-2024 Yegor Bugayenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal diff --git a/macros/latex/contrib/href-ul/README.md b/macros/latex/contrib/href-ul/README.md index 8ad680d582..d5a941ed61 100644 --- a/macros/latex/contrib/href-ul/README.md +++ b/macros/latex/contrib/href-ul/README.md @@ -18,7 +18,7 @@ Go to \href{https://www.google.com}{Google}! \end{document} ``` -Otherwise, you can download [`to-be-determined.sty`](https://raw.githubusercontent.com/yegor256/href-ul/gh-pages/href-ul/href-ul.sty) and add to your project. +Otherwise, you can download [`href-ul.sty`](https://yegor256.github.io/href-ul/href-ul.sty) and add to your project. If you want to contribute yourself, make a fork, then create a branch, then run `l3build ctan` in the root directory. diff --git a/macros/latex/contrib/href-ul/href-ul.dtx b/macros/latex/contrib/href-ul/href-ul.dtx index 82aa5e6f70..e0c410d9cc 100644 --- a/macros/latex/contrib/href-ul/href-ul.dtx +++ b/macros/latex/contrib/href-ul/href-ul.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % (The MIT License) % -% Copyright (c) 2021-2022 Yegor Bugayenko +% Copyright (c) 2021-2024 Yegor Bugayenko % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the 'Software'), to deal @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{href-ul} %<*package> -[31.10.20220 0.3.0 Underlined Hyperlinks] +[09.01.20240 0.4.0 Underlined Hyperlinks] %</package> %<*driver> \documentclass{ltxdoc} @@ -117,16 +117,47 @@ % \end{document} % \end{docshot} +% With the help of the |plain| package option, it's possible to avoid underscores: +% \docshotOptions{firstline=3,lastline=7} +% \begin{docshot} +% \documentclass{article} +% \pagestyle{empty} +% \usepackage[plain]{href-ul} +% \begin{document} +% This link has no underscore: \\ +% \href{https://google.com}{Google}. +% \end{document} +% \end{docshot} + % \StopEventually{} % \section{Implementation} % \changes{v0.2.0}{2021/06/11}{Initial version} % \changes{v0.3.0}{2022/10/31}{We started using "docshots" package for better rendering of examples.} -% First, we include two packages: +% First, we process package options: +% \changes{0.4.0}{2024/01/09}{Package options processing introduced with a single \texttt{plain} option.} % \begin{macrocode} +\RequirePackage{pgfopts} +\pgfkeys{ + /href/.cd, + plain/.store in=\href@plain +} +\ProcessPgfPackageOptions{/href} +% \end{macrocode} + +% Then, we include the |ulem| package in order to enable underscores: +% \begin{macrocode} +\makeatletter +\ifdefined\href@plain\else \PassOptionsToPackage{normalem}{ulem} \RequirePackage{ulem} +\fi +\makeatother +% \end{macrocode} + +% Then, we include the |hyperref| package for PDF hyperlinks: +% \begin{macrocode} \PassOptionsToPackage{hidelinks}{hyperref} \RequirePackage{hyperref} % \end{macrocode} @@ -134,14 +165,17 @@ % \begin{macro}{\href} % Then, we define the |\href| command: % \begin{macrocode} -\makeatletter\begingroup% +\makeatletter% +\begingroup% \catcode`\$=6 % \catcode`\#=12 % \gdef\href@split$1#$2#$3\\$4{% - \hyper@@link{$1}{$2}{\uline{$4}}% + \hyper@@link{$1}{$2}{% + \ifdefined\href@plain$4\else\uline{$4}\fi}% \endgroup% }% -\endgroup\makeatother +\endgroup% +\makeatother% % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/href-ul/href-ul.ins b/macros/latex/contrib/href-ul/href-ul.ins index abfcb368ff..332400c0dc 100644 --- a/macros/latex/contrib/href-ul/href-ul.ins +++ b/macros/latex/contrib/href-ul/href-ul.ins @@ -1,6 +1,6 @@ %% (The MIT License) %% -%% Copyright (c) 2021-2022 Yegor Bugayenko +%% Copyright (c) 2021-2024 Yegor Bugayenko %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the 'Software'), to deal @@ -26,7 +26,7 @@ \preamble (The MIT License) -Copyright (c) 2021-2022 Yegor Bugayenko +Copyright (c) 2021-2024 Yegor Bugayenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal diff --git a/macros/latex/contrib/href-ul/href-ul.pdf b/macros/latex/contrib/href-ul/href-ul.pdf Binary files differindex 46b31bf10a..53dc60a20b 100644 --- a/macros/latex/contrib/href-ul/href-ul.pdf +++ b/macros/latex/contrib/href-ul/href-ul.pdf |