diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-30 00:17:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-30 00:17:47 +0000 |
commit | cd372ffee7c90e2eff5670443481ea8eb4b3446c (patch) | |
tree | 61538e8c0f5d7a972e03232f6c25f52861590357 /Master/texmf-dist/tex/latex | |
parent | e89ce0893b4e70d0e6cdcee932116f596b10c56a (diff) |
hrefhide 1.0f (29apr11)
git-svn-id: svn://tug.org/texlive/trunk@22255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty | 113 |
1 files changed, 84 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty b/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty index 035bb614321..6ff837382b8 100644 --- a/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty +++ b/Master/texmf-dist/tex/latex/hrefhide/hrefhide.sty @@ -8,10 +8,13 @@ %% %% This is a generated file. %% -%% IMPORTANT NOTICE: -%% The package takes options. +%% Project: hrefhide +%% Version: 2011/04/29 v1.0f %% -%% The usual disclaimers apply: +%% 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.) @@ -28,29 +31,30 @@ %% %% This work has the LPPL maintenance status "maintained". %% -%% The Current Maintainer of this work is H.-Martin Muench -%% (Martin dot Muench at Uni-Bonn dot de). +%% 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. %% -\NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{hrefhide}[2011/02/01 v1.0e +\NeedsTeXFormat{LaTeX2e}[2009/09/24] +\ProvidesPackage{hrefhide}[2011/04/29 v1.0f 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) -%% by providing the command \hrefdisplayonly. +%% by providing the command \hrefdisplayonly +%% and allows simulating to switch on/off ocgcolourlinks +%% of the hyperref package by Heiko Oberdiek. -\RequirePackage{color}[2005/11/14]% v1.0j, from the graphics bundle -\RequirePackage{hyperref}[2010/12/16]% v6.81z -\RequirePackage{kvoptions}[2010/02/22]% v3.7 -%% hrefhide may work with earlier versions of those packages, -%% but this was not tested. Please consider updating your packages -%% to the most recent version (if they are not already the most -%% recent version). +\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). \SetupKeyvalOptions{family = hrefhide, prefix = hrefhide@} \DeclareStringOption[black]{linktextcolour}[black] @@ -59,25 +63,76 @@ \ProcessKeyvalOptions* +\gdef\hrefhide@status@ON{ON} +\gdef\hrefhide@status@OFF{OFF} + \newcommand{\hycon}{% - \relax% - } +\ifx\hrefhide@status\hrefhide@status@OFF% +\@ifundefined{@anchorbordercolor}{% +\hypersetup{anchorcolor=\hrefhide@anchorbordercolor}% +}{% +\definecolor{hyanchorbordercolor}{rgb}{\@anchorbordercolor}% +\hypersetup{anchorcolor=hyanchorbordercolor}% +}% +\definecolor{hycitebordercolor}{rgb}{\@citebordercolor}% +\hypersetup{citecolor=hycitebordercolor}% +\definecolor{hyfilebordercolor}{rgb}{\@filebordercolor}% +\hypersetup{filecolor=hyfilebordercolor}% +\definecolor{hylinkbordercolor}{rgb}{\@linkbordercolor}% +\hypersetup{linkcolor=hylinkbordercolor}% +\definecolor{hymenubordercolor}{rgb}{\@menubordercolor}% +\hypersetup{menucolor=hymenubordercolor}% +\definecolor{hyrunbordercolor}{rgb}{\@runbordercolor}% +\hypersetup{runcolor=hyrunbordercolor}% +\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}% +\fi% +} \newcommand{\hycoff}{% - \hypersetup{linkcolor=\hrefhide@linktextcolour}% - \def\@pdfborder{\hrefhide@pdfborder}% - \Hy@Info{Link coloring OFF (sort of; hrefhide package)}% - } +\ifx\hrefhide@status\hrefhide@status@ON% +\@ifundefined{@anchorbordercolor}{% +\global\edef\hrefhide@anchorbordercolor{\@anchorcolor}% +}{% +\hypersetup{anchorbordercolor=\@anchorcolor}% +}% +\hypersetup{anchorcolor=\hrefhide@linktextcolour}% +\hypersetup{citebordercolor=\@citecolor}% +\hypersetup{citecolor=\hrefhide@linktextcolour}% +\hypersetup{filebordercolor=\@filecolor}% +\hypersetup{filecolor=\hrefhide@linktextcolour}% +\hypersetup{linkbordercolor=\@linkcolor}% +\hypersetup{linkcolor=\hrefhide@linktextcolour}% +\hypersetup{menubordercolor=\@menucolor}% +\hypersetup{menucolor=\hrefhide@linktextcolour}% +\hypersetup{runbordercolor=\@runcolor}% +\hypersetup{runcolor=\hrefhide@linktextcolour}% +\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}% +\else% +\PackageWarning{hrefhide}{\string\hycoff\space called when OCG-link colouring was not ON \MessageBreak% +- nothing done}% +\fi% +} \newcommand{\hrefdisplayonly}[2]{% - \hycon% - {\color{\hrefhide@backgroundcolour} \href{#1}{#2}}% - \hycoff% - } +{\color{\hrefhide@backgroundcolour}\href{#1}{#2}}% +} \AtBeginDocument{% - \ifHy@ocgcolorlinks \relax% + \ifHy@ocgcolorlinks% + \gdef\hrefhide@status{ON}% \else% + \gdef\hrefhide@status{OFF}% \PackageError{hrefhide}{hyperref package missing option ocgcolorlinks}{% The package hrefhide needs the hyperref package\MessageBreak% with option ocgcolorlinks.\MessageBreak% @@ -86,13 +141,13 @@ }% \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% - (No large harm was done, but the respective\MessageBreak% + (Probably no large harm was done, but the respective\MessageBreak% link text will neither be hidden when printing.)\MessageBreak% }% \fi% |