summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/undolabl/undolabl-example.tex
blob: e77e2d8499721ffabfb85fab9d3de4ed6e64a97d (plain)
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
%%
%% This is file `undolabl-example.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% undolabl.dtx  (with options: `example')
%% 
%% This is a generated file.
%% 
%% Project: undolabl
%% Version: 2011/08/08 v1.0j
%% 
%% Copyright (C) 2010, 2011 by
%%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
%% Portions of code copyrighted by other people as marked.
%% 
%% 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.)
%% 
%% 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
%% and the latest version of this license is in
%%    http://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.
%% 
%% The main code of this package was invented by Ulrich Diez
%% (eu_angelion AT web DOT de) and first published in the comp.text.tex
%% newsgroup at Sun, 20 Apr 2008 16:39:26 +0200, with subject:
%% Re: How to undefine/overwrite a label? (see e.g.
%% http://groups.google.de/group/comp.text.tex/msg/af6cfe93917097da?dmode=source
%% ). While Ulrich Diez neither wanted to create a package himself yet
%% nor have one published under his name, he granted the
%% publication of his code. Therefore: Thanks!
%% 
%% This work consists of the main source file undolabl.dtx
%% and the derived files
%%    undolabl.sty, undolabl.pdf, undolabl.ins, undolabl.drv,
%%    undolabl-example.tex.
%% 
\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{undolabl}[2011/08/08]% v1.0j
%% There are no options for the undolabl package. %%
\usepackage{hyperref}[2011/04/17]% v6.82g; when you want to use nameref
\hypersetup{%
 extension=pdf,%
 plainpages=false,%
 pdfpagelabels=true,%
 hyperindex=false,%
 pdflang={en},%
 pdftitle={undolabl package example},%
 pdfauthor={Hans-Martin Muench, after Ulrich Diez},%
 pdfsubject={Example for the undolabl package},%
 pdfkeywords={LaTeX, undolabl, Ulrich Diez, Hans-Martin Muench},%
 pdfview=FitH,%
 pdfstartview=FitH,%
 pdfpagelayout=OneColumn,%
 bookmarksopen=true%
}
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
\pagenumbering{arabic}
\section*{Example for undolabl}

This example demonstrates the use of package\newline
\textsf{undolabl}, v1.0j as of 2011/08/08 (HMM).\newline
For details please see the documentation!\newline

\noindent Save per page about $200\unit{ml}$~water,
$2\unit{g}$~CO$_{2}$ and $2\unit{g}$~wood:\newline
Therefore please print only if this is really necessary.\newline
I do NOT think, that it is necessary to print THIS file, really\newline
(at least not after this page)!

\bigskip

\section{Test}

text \label{testlabel}\\
page-reference: \pageref{testlabel}\\%% -> page 4
sectional-reference: \ref{testlabel}\\%% -> section 4
name-reference: \nameref{testlabel}%% -> Still another test

\newpage

\section{Another test}

text \overridelabel{testlabel}\\
page-reference: \pageref{testlabel}\\%% -> page 4
sectional-reference: \ref{testlabel}\\%% -> section 4
name-reference: \nameref{testlabel}%% -> Still another test

\newpage

\section{Yet another test}

text \overridelabel{testlabel}\\
page-reference: \pageref{testlabel}\\%% -> page 4
sectional-reference: \ref{testlabel}\\%% -> section 4
name-reference: \nameref{testlabel}%% -> Still another test

\newpage

\section{Still another test}

text \overridelabel{testlabel}\\
page-reference: \pageref{testlabel}\\%% -> page 4
sectional-reference: \ref{testlabel}\\%% -> section 4
name-reference: \nameref{testlabel}%% -> Still another test

\end{document}

\endinput
%%
%% End of file `undolabl-example.tex'.