alo@0
|
1 %%
|
alo@0
|
2 %% This is file `aliascnt.sty',
|
alo@0
|
3 %% generated with the docstrip utility.
|
alo@0
|
4 %%
|
alo@0
|
5 %% The original source files were:
|
alo@0
|
6 %%
|
alo@0
|
7 %% aliascnt.dtx (with options: `package')
|
alo@0
|
8 %%
|
alo@0
|
9 %% This is a generated file.
|
alo@0
|
10 %%
|
alo@0
|
11 %% Project: aliascnt
|
alo@0
|
12 %% Version: 2009/09/08 v1.3
|
alo@0
|
13 %%
|
alo@0
|
14 %% Copyright (C) 2006, 2009 by
|
alo@0
|
15 %% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
|
alo@0
|
16 %%
|
alo@0
|
17 %% This work may be distributed and/or modified under the
|
alo@0
|
18 %% conditions of the LaTeX Project Public License, either
|
alo@0
|
19 %% version 1.3c of this license or (at your option) any later
|
alo@0
|
20 %% version. This version of this license is in
|
alo@0
|
21 %% http://www.latex-project.org/lppl/lppl-1-3c.txt
|
alo@0
|
22 %% and the latest version of this license is in
|
alo@0
|
23 %% http://www.latex-project.org/lppl.txt
|
alo@0
|
24 %% and version 1.3 or later is part of all distributions of
|
alo@0
|
25 %% LaTeX version 2005/12/01 or later.
|
alo@0
|
26 %%
|
alo@0
|
27 %% This work has the LPPL maintenance status "maintained".
|
alo@0
|
28 %%
|
alo@0
|
29 %% This Current Maintainer of this work is Heiko Oberdiek.
|
alo@0
|
30 %%
|
alo@0
|
31 %% This work consists of the main source file aliascnt.dtx
|
alo@0
|
32 %% and the derived files
|
alo@0
|
33 %% aliascnt.sty, aliascnt.pdf, aliascnt.ins, aliascnt.drv.
|
alo@0
|
34 %%
|
alo@0
|
35 \NeedsTeXFormat{LaTeX2e}
|
alo@0
|
36 \ProvidesPackage{aliascnt}%
|
alo@0
|
37 [2009/09/08 v1.3 Alias counter (HO)]%
|
alo@0
|
38 \newcommand*{\newaliascnt}[2]{%
|
alo@0
|
39 \begingroup
|
alo@0
|
40 \def\AC@glet##1{%
|
alo@0
|
41 \global\expandafter\let\csname##1#1\expandafter\endcsname
|
alo@0
|
42 \csname##1#2\endcsname
|
alo@0
|
43 }%
|
alo@0
|
44 \@ifundefined{c@#2}{%
|
alo@0
|
45 \@nocounterr{#2}%
|
alo@0
|
46 }{%
|
alo@0
|
47 \expandafter\@ifdefinable\csname c@#1\endcsname{%
|
alo@0
|
48 \AC@glet{c@}%
|
alo@0
|
49 \AC@glet{the}%
|
alo@0
|
50 \AC@glet{theH}%
|
alo@0
|
51 \AC@glet{p@}%
|
alo@0
|
52 \expandafter\gdef\csname AC@cnt@#1\endcsname{#2}%
|
alo@0
|
53 \expandafter\gdef\csname cl@#1\expandafter\endcsname
|
alo@0
|
54 \expandafter{\csname cl@#2\endcsname}%
|
alo@0
|
55 }%
|
alo@0
|
56 }%
|
alo@0
|
57 \endgroup
|
alo@0
|
58 }
|
alo@0
|
59 \newcommand*{\aliascntresetthe}[1]{%
|
alo@0
|
60 \@ifundefined{AC@cnt@#1}{%
|
alo@0
|
61 \PackageError{aliascnt}{%
|
alo@0
|
62 `#1' is not an alias counter%
|
alo@0
|
63 }\@ehc
|
alo@0
|
64 }{%
|
alo@0
|
65 \expandafter\let\csname the#1\expandafter\endcsname
|
alo@0
|
66 \csname the\csname AC@cnt@#1\endcsname\endcsname
|
alo@0
|
67 }%
|
alo@0
|
68 }
|
alo@0
|
69 \newcommand*{\AC@findrootcnt}[1]{%
|
alo@0
|
70 \@ifundefined{AC@cnt@#1}{%
|
alo@0
|
71 #1%
|
alo@0
|
72 }{%
|
alo@0
|
73 \expandafter\AC@findrootcnt\csname AC@cnt@#1\endcsname
|
alo@0
|
74 }%
|
alo@0
|
75 }
|
alo@0
|
76 \def\AC@patch#1{%
|
alo@0
|
77 \expandafter\let\csname AC@org@#1reset\expandafter\endcsname
|
alo@0
|
78 \csname @#1reset\endcsname
|
alo@0
|
79 \expandafter\def\csname @#1reset\endcsname##1##2{%
|
alo@0
|
80 \csname AC@org@#1reset\endcsname{##1}{\AC@findrootcnt{##2}}%
|
alo@0
|
81 }%
|
alo@0
|
82 }
|
alo@0
|
83 \RequirePackage{remreset}
|
alo@0
|
84 \AC@patch{addto}
|
alo@0
|
85 \AC@patch{removefrom}
|
alo@0
|
86 \endinput
|
alo@0
|
87 %%
|
alo@0
|
88 %% End of file `aliascnt.sty'.
|