summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty124
1 files changed, 66 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty b/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty
index 6ff837382b8..4aecfc47618 100644
--- a/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty
+++ b/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty
@@ -9,65 +9,77 @@
%% This is a generated file.
%%
%% Project: hrefhide
-%% Version: 2011/04/29 v1.0f
+%% Version: 2023-02-26 v1.1a
+%% Info: Hiding hyperrefs when printing pdf files
%%
-%% Copyright (C) 2010, 2011 by
-%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
-%%
-%% The usual disclaimer applys:
-%% If it doesn't work right that's your problem.
-%% (Nevertheless, send an e-mail to the maintainer
-%% when you find an error in this package.)
+%% Copyright (C) 2010 - 2023 by
+%% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
-%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
+%% LaTeX version 2005-12-01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is H.-Martin Muench.
%%
-%% This work consists of the main source file hrefhide.dtx
-%% and the derived files
-%% hrefhide.sty, hrefhide.pdf, hrefhide.ins, hrefhide.drv,
-%% hrefhide-example.tex.
+%% This work consists of the main source file hrefhide.dtx,
+%% the README, and the derived files
+%% hrefhide.sty, hrefhide.pdf,
+%% hrefhide.ins, hrefhide.drv,
+%% hrefhide-example.tex, hrefhide-example.pdf.
%%
-\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\ProvidesPackage{hrefhide}[2011/04/29 v1.0f
- Hiding hyperrefs when printing pdf files (HMM)]%
-
+%% In memoriam
+%% Claudia Simone Barth + 1996-01-30
+%% Tommy Muench + 2014-01-02
+%% Hans-Klaus Muench + 2014-08-24
+%%
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\ProvidesPackage{hrefhide}[2023-02-26 v1.1a
+ Hiding hyperrefs when printing pdf files (HMM)]
%% Allows to "hide" hyperlinked text in a pdf file when printing
-%% ("Klick here" does not work on real paper)
+%% ("Click here" does not work on physical paper)
%% by providing the command \hrefdisplayonly
%% and allows simulating to switch on/off ocgcolourlinks
-%% of the hyperref package by Heiko Oberdiek.
+%% of the hyperref package.
-\RequirePackage{xcolor}[2007/01/21]% v2.11
-\RequirePackage[ocgcolorlinks]{hyperref}[2011/04/17]% v6.82g
-\RequirePackage{kvoptions}[2010/12/23]% v3.10
-%% hrefhide may work with earlier versions of LaTeX and those
-%% packages, but this was not tested. Please consider updating
-%% your LaTeX and packages to the most recent version
-%% (if they are not already the most recent version).
+\@ifl@t@r\fmtversion{2022/11/01}{% would have understood
+ % \IfFormatAtLeastTF{2022-11-01}{<true code>}{<false code>}
+ }{\PackageError{hrefhide}{%
+ Newer LaTeX format needed or older hrefhide package%
+ }{Needed LaTeX format version: 2022-11-01 or newer.\MessageBreak%
+ Found\space\space LaTeX format version: \fmtversion.\MessageBreak%
+ Either update your TeX distribution\MessageBreak%
+ or use an archived version of hrefhide\MessageBreak%
+ (see section History in the documentation).\MessageBreak%
+ }
+ }
+
+\RequirePackage{xcolor}[2022/06/12]% v2.14 LaTeX color extensions (UK)
+\RequirePackage[ocgcolorlinks]{hyperref}[2023-02-07]% v7.00v Hypertext links for LaTeX
+\RequirePackage{kvoptions}[2022-06-15]% v3.15 Key value format for package options (HO)
-\SetupKeyvalOptions{family = hrefhide, prefix = hrefhide@}
+\SetupKeyvalOptions{family=hrefhide,prefix=hrefhide@}
\DeclareStringOption[black]{linktextcolour}[black]
\DeclareStringOption[white]{backgroundcolour}[white]
\DeclareStringOption[{0 0 1}]{pdfborder}[{0 0 1}]
\ProcessKeyvalOptions*
-\gdef\hrefhide@status@ON{ON}
-\gdef\hrefhide@status@OFF{OFF}
+\newif\ifhrefhide
-\newcommand{\hycon}{%
-\ifx\hrefhide@status\hrefhide@status@OFF%
+\DeclareRobustCommand{\hycon}{%
+\ifhrefhide%
+\PackageWarning{hrefhide}{\string\hycon\space called when OCG-link %
+ coloring was not OFF\MessageBreak%
+ - nothing done}%
+\else%
\@ifundefined{@anchorbordercolor}{%
\hypersetup{anchorcolor=\hrefhide@anchorbordercolor}%
}{%
@@ -87,20 +99,16 @@
\definecolor{hyurlbordercolor}{rgb}{\@urlbordercolor}%
\hypersetup{urlcolor=hyurlbordercolor}%
\hypersetup{pdfborder=0 0 0}%
-\gdef\hrefhide@status{ON}%
-\PackageInfo{hrefhide}{OCG-link colouring ON\MessageBreak}%
-\else%
-\PackageWarning{hrefhide}{\string\hycon\space called when OCG-link colouring was not OFF \MessageBreak%
-- nothing done}%
+\hrefhidetrue%
+\PackageInfo{hrefhide}{OCG-link coloring ON\MessageBreak}%
\fi%
}
-\newcommand{\hycoff}{%
-\ifx\hrefhide@status\hrefhide@status@ON%
+\DeclareRobustCommand{\hycoff}{%
+\ifhrefhide%
\@ifundefined{@anchorbordercolor}{%
-\global\edef\hrefhide@anchorbordercolor{\@anchorcolor}%
-}{%
-\hypersetup{anchorbordercolor=\@anchorcolor}%
+\xdef\hrefhide@anchorbordercolor{\@anchorcolor}%
+}{\hypersetup{anchorbordercolor=\@anchorcolor}%
}%
\hypersetup{anchorcolor=\hrefhide@linktextcolour}%
\hypersetup{citebordercolor=\@citecolor}%
@@ -116,36 +124,36 @@
\hypersetup{urlbordercolor=\@urlcolor}%
\hypersetup{urlcolor=\hrefhide@linktextcolour}%
\hypersetup{pdfborder=\hrefhide@pdfborder}%
-\gdef\hrefhide@status{OFF}%
-\PackageInfo{hrefhide}{OCG-link colouring OFF (sort of; hrefhide package)\MessageBreak}%
+\hrefhidefalse%
+\PackageInfo{hrefhide}{OCG-link coloring OFF (sort of; hrefhide package)%
+ \MessageBreak}%
\else%
-\PackageWarning{hrefhide}{\string\hycoff\space called when OCG-link colouring was not ON \MessageBreak%
-- nothing done}%
+\PackageWarning{hrefhide}{\string\hycoff\space called when OCG-link %
+ coloring was not ON\MessageBreak%
+ - nothing done}%
\fi%
}
-\newcommand{\hrefdisplayonly}[2]{%
-{\color{\hrefhide@backgroundcolour}\href{#1}{#2}}%
-}
+\DeclareRobustCommand{\hrefdisplayonly}[2]{%
+{\color{\hrefhide@backgroundcolour}\href{#1}{#2}}}
-\AtBeginDocument{%
- \ifHy@ocgcolorlinks%
- \gdef\hrefhide@status{ON}%
- \else%
- \gdef\hrefhide@status{OFF}%
+\AddToHook{begindocument}{%
+ \IfPackageLoadedWithOptionsTF{hyperref}{ocgcolorlinks}{\hrefhidetrue}{%
+ \hrefhidefalse%
\PackageError{hrefhide}{hyperref package missing option ocgcolorlinks}{%
The package hrefhide needs the hyperref package\MessageBreak%
with option ocgcolorlinks.\MessageBreak%
That option is missing!\MessageBreak%
Now the link(s) will be ''hidden'' in pdf view also.\MessageBreak%
}%
- \fi%
+ }%
\def\hrefhide@driver{hpdftex}%
- \ifx\Hy@driver\hrefhide@driver% \relax
+ \ifx\Hy@driver\hrefhide@driver\relax%
\else%
\PackageError{hrefhide}{Producing not a pdf file}{%
The package hrefhide only works for a pdf file,\MessageBreak%
- but driver \Hy@driver\space instead of \hrefhide@driver\space was found.\MessageBreak%
+ but driver \Hy@driver\space instead of \hrefhide@driver\space%
+ was found.\MessageBreak%
Use pdfLaTeX to compile your document.\MessageBreak%
(Probably no large harm was done, but the respective\MessageBreak%
link text will neither be hidden when printing.)\MessageBreak%