1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
%%
%% This is file `hrefhide-example.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hrefhide.dtx (with options: `example')
%%
%% This is a generated file.
%%
%% Project: hrefhide
%% Version: 2023-02-26 v1.1a
%% Info: Hiding hyperrefs when printing pdf files
%%
%% 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
%% https://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%% 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.
%%
%% 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,
%% the README, and the derived files
%% hrefhide.sty, hrefhide.pdf,
%% hrefhide.ins, hrefhide.drv,
%% hrefhide-example.tex, hrefhide-example.pdf.
%%
%% In memoriam
%% Claudia Simone Barth + 1996-01-30
%% Tommy Muench + 2014-01-02
%% Hans-Klaus Muench + 2014-08-24
%%
\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\documentclass[british]{article}[2022/07/02]% v1.4n Standard LaTeX document class
\usepackage{lipsum}[2021-09-20]% v2.7 150 paragraphs of Lorem Ipsum dummy text
\usepackage[ocgcolorlinks,bookmarks=false,bookmarksopen=false%
]{hyperref}[2023-02-07]% v7.00v Hypertext links for LaTeX
\hypersetup{extension=pdf,%
plainpages=false,%
pdfpagelabels=true,%
hyperindex=false,%
pdflang={en},%
pdftitle={hrefhide package example},%
pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the hrefhide package},%
pdfkeywords={LaTeX, hrefhide},%
pdfview=Fit,pdfstartview=Fit,%
pdfpagelayout=SinglePage%
}
\usepackage[linktextcolour=black,backgroundcolour=white,pdfborder={0 0 1}%
]{hrefhide}[2023-02-26]% v1.1a Hiding hyperrefs when printing pdf files (HMM)
\listfiles
\begin{document}
\pagenumbering{arabic}
\section*{Example for hrefhide}
\markboth{Example for hrefhide}{Example for hrefhide}
This example demonstrates the use of package\newline
\textsf{hrefhide}, v1.1a as of 2023-02-26 (HMM).\newline
The used options were \texttt{linktextcolour=black},
\texttt{backgroundcolour=white}, and \texttt{pdfborder={0 0 1}}
(the default ones).\newline
For more details please see the documentation!\newline
\textit{Print-\textbf{preview} the first page of this document
and compare it with the page as displayed in your pdf reader.}
\bigskip
Lorem ipsum dolor sit amet \href{\#target}{link to target} consectetuer
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
dolore magna aliquam erat volutpat.
Ut wisi enim ad minim
veniam \hrefdisplayonly{\#target}{hidden link to target} quis nostrud
exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea
commodo consequat.
Duis autem vel eum iriure dolor \href{\#target}{link to target} in
hendrerit in vulputate velit esse molestie consequat, vel illum dolore
eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi.
\noindent \textbf{\textsf{%
\hrefdisplayonly{\#RefA}{A}
\hrefdisplayonly{\#RefB}{B}
\hrefdisplayonly{\#RefC}{C}
\hrefdisplayonly{\#RefD}{D}
\hrefdisplayonly{\#RefE}{E}
\hrefdisplayonly{\#RefF}{F}
\hrefdisplayonly{\#RefG}{G}
\hrefdisplayonly{\#RefH}{H}
\hrefdisplayonly{\#RefI}{I}
\hrefdisplayonly{\#RefJ}{J}
\hrefdisplayonly{\#RefK}{K}
\hrefdisplayonly{\#RefL}{L}
\hrefdisplayonly{\#RefM}{M}
\hrefdisplayonly{\#RefN}{N}
\hrefdisplayonly{\#RefO}{O}
\hrefdisplayonly{\#RefP}{P}
\hrefdisplayonly{\#RefQ}{Q}
\hrefdisplayonly{\#RefR}{R}
\hrefdisplayonly{\#RefS}{S}
\hrefdisplayonly{\#RefT}{T}
\hrefdisplayonly{\#RefU}{U}
\hrefdisplayonly{\#RefV}{V}
\hrefdisplayonly{\#RefW}{W}
\hrefdisplayonly{\#RefX}{X}
\hrefdisplayonly{\#RefY}{Y}
\hrefdisplayonly{\#RefZ}{Z}}}\linebreak
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a,
magna.
Switching to colored links with \verb|\hycon|:\newline
\hycon%
\href{\#RefX}{section X} and also
\href{https://ctan.org/pkg/hrefhide}{https://ctan.org/pkg/hrefhide}.
Switching off the colored links with \verb|\hycoff| again:\newline
\hycoff%
\href{\#RefX}{section X} and also
\href{https://ctan.org/pkg/hrefhide}{https://ctan.org/pkg/hrefhide}.
\pagebreak
{\Large \textbf{Targets}}\\
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. \hypertarget{target}{target text} Ut wisi enim ad minim
veniam, quis nostrud exerci tation ullamcorper suscipit lobortis
nisl ut aliquip ex ea commodo consequat.
\section[A]{\hypertarget{RefA}{A}} \lipsum[1]
\section[B]{\hypertarget{RefB}{B}} \lipsum[1]
\section[C]{\hypertarget{RefC}{C}} \lipsum[1]
\section[D]{\hypertarget{RefD}{D}} \lipsum[1]
\section[E]{\hypertarget{RefE}{E}} \lipsum[1]
\section[F]{\hypertarget{RefF}{F}} \lipsum[1]
\section[G]{\hypertarget{RefG}{G}} \lipsum[1]
\section[H]{\hypertarget{RefH}{H}} \lipsum[1]
\section[I]{\hypertarget{RefI}{I}} \lipsum[1]
\section[J]{\hypertarget{RefJ}{J}} \lipsum[1]
\section[K]{\hypertarget{RefK}{K}} \lipsum[1]
\section[L]{\hypertarget{RefL}{L}} \lipsum[1]
\section[M]{\hypertarget{RefM}{M}} \lipsum[1]
\section[N]{\hypertarget{RefN}{N}} \lipsum[1]
\section[O]{\hypertarget{RefO}{O}} \lipsum[1]
\section[P]{\hypertarget{RefP}{P}} \lipsum[1]
\section[Q]{\hypertarget{RefQ}{Q}} \lipsum[1]
\section[R]{\hypertarget{RefR}{R}} \lipsum[1]
\section[S]{\hypertarget{RefS}{S}} \lipsum[1]
\section[T]{\hypertarget{RefT}{T}} \lipsum[1]
\section[U]{\hypertarget{RefU}{U}} \lipsum[1]
\section[V]{\hypertarget{RefV}{V}} \lipsum[1]
\section[W]{\hypertarget{RefW}{W}} \lipsum[1]
\section[X]{\hypertarget{RefX}{X}} \lipsum[1]
\section[Y]{\hypertarget{RefY}{Y}} \lipsum[1]
\section[Z]{\hypertarget{RefZ}{Z}} \lipsum[1]
\end{document}
\endinput
%%
%% End of file `hrefhide-example.tex'.
|