blob: 655da4473cf19b9f64acbdaedee55344a06c7685 (
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
|
%%
%% This is file `relabel.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cc.dtx (with options: `relabel,chartab')
%%
%% Copyright 2000-2015
%% Michael N"usken, Joachim von zur Gathen, computational complexity
%%
%% IMPORTANT NOTICE:
%%
%% This is a generated file. It is part of the
%% computational complexity macro package
%% derived from cc.dtx by 'tex cc.ins'.
%% See cc.dtx for license information.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%% Copyright (C) 1998 Michael N\"{u}sken, all rights reserved.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{relabel}[2014/07/08 v1.02 Relabel. MNuesken]
\newif\if@prefixes
\DeclareOption{prefixes}{\@prefixestrue}
\DeclareOption{noprefixes}{\@prefixesfalse}
\newif\if@bare
\DeclareOption{bare}{\@baretrue}
\DeclareOption{nobare}{\@barefalse}
\ExecuteOptions{prefixes,nobare}
\ProcessOptions*
\newcommand*{\Label}[2]{\modify{#2}\label{#1}\revert}
\newcommand*{\modify}[1]{\@bsphack%
\global\let\revert@currentlabel\@currentlabel
\global\let\revert@bare@currentlabel\@bare@currentlabel
\def\@tempb##1{#1}
\protected@edef\@currentlabel{\@tempb{\@currentlabel}}%
\@esphack}
\newcommand*{\revert}{\@bsphack
\global\let\@currentlabel\revert@currentlabel
\global\let\@bare@currentlabel\revert@bare@currentlabel
\@esphack}
\let\revert@currentlabel\relax
\let\revert@bare@currentlabel\relax
\newcommand*{\setcurrentlabel}[1]{%
\protected@edef\@currentlabel{#1}%
\let\@bare@currentlabel\@currentlabel}
\newcommand*{\defprefix}[1]{\if@prefixes
\def\next{\expandafter\def\csname p\string @#1\endcsname}%
\else\def\next{\def\next}\fi\next}
\newcommand*{\useprefix}[1]{\csname p\string @#1\endcsname}
\newcommand*{\uselabel}[1]{\csname p\string @#1\expandafter
\endcsname\csname the#1\endcsname}
\def\defprefixcond#1#2{\defprefix{#1}{\conduselabel{#2}}}
\newcommand*{\Iflabelchanged}[2]{%
\protect\protect\protect\@@conduselabel
{{\protect\csname the#1\endcsname}}%
{{\csname the#1\endcsname}}%
{#2}%
}
\def\conduselabel#1{% obsolete
\protect\protect\protect\@@conduselabel
{{\protect\csname the#1\endcsname}}%
{{\csname the#1\endcsname}}%
{\csname p\string @#1\endcsname{\csname the#1\endcsname}}%
}%
\def\@@conduselabel#1#2#3{{%
\let\protect\relax
\edef\@tempa{#1}%
\edef\@tempc{#2}%
\ifx\@tempa\@tempc\relax\@condlabelfalse\else\@condlabeltrue\fi
\iflonglabel\@condlabeltrue\fi
\ifshortlabel\@condlabelfalse\fi
\if@condlabel #3\fi
}}
\newif\if@condlabel
\newif\iflonglabel \longlabelfalse
\newif\ifshortlabel \shortlabelfalse
\def\short\ref#1{{\shortlabeltrue\ref{#1}}}
\def\whole\ref#1{{\longlabeltrue\ref{#1}}}
\def\quiet\ref#1{\vphantom{\ref{#1}}}
\CheckCommand*\refstepcounter[1]{\stepcounter{#1}%
\protected@edef\@currentlabel
{\csname p@#1\endcsname\csname the#1\endcsname}%
}
\def\refstepcounter#1{\stepcounter{#1}%
\protected@edef\@currentlabel
{\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
\protected@edef\@bare@currentlabel
{\csname the#1\endcsname}%
}
\if@bare
\def\relabel@label#1{\ifx\@currentlabel\@bare@currentlabel\else
{\let\@currentlabel\@bare@currentlabel\relabel@olabel{bare@#1}}%
\fi\relabel@olabel{#1}}
\def\init@bare{\if@bare\let\relabel@olabel\label\let\label\relabel@label\fi}
\AtBeginDocument{\init@bare}%
\def\bare\ref#1{\@ifundefined{r@bare@#1}{\ref{#1}}{\ref{bare@#1}}}
\else
\def\bare{\PackageWarning{relabel}{\string\bare\space disabled! (Use
option bare to enable it.)}}
\def\init@bare{}
\fi
\let\@bare@currentlabel\@currentlabel
\endinput
%%
%% End of file `relabel.sty'.
|