2 %% This is file `aliascnt.sty',
\r
3 %% generated with the docstrip utility.
\r
5 %% The original source files were:
\r
7 %% aliascnt.dtx (with options: `package')
\r
9 %% This is a generated file.
\r
11 %% Project: aliascnt
\r
12 %% Version: 2009/09/08 v1.3
\r
14 %% Copyright (C) 2006, 2009 by
\r
15 %% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
\r
17 %% This work may be distributed and/or modified under the
\r
18 %% conditions of the LaTeX Project Public License, either
\r
19 %% version 1.3c of this license or (at your option) any later
\r
20 %% version. This version of this license is in
\r
21 %% http://www.latex-project.org/lppl/lppl-1-3c.txt
\r
22 %% and the latest version of this license is in
\r
23 %% http://www.latex-project.org/lppl.txt
\r
24 %% and version 1.3 or later is part of all distributions of
\r
25 %% LaTeX version 2005/12/01 or later.
\r
27 %% This work has the LPPL maintenance status "maintained".
\r
29 %% This Current Maintainer of this work is Heiko Oberdiek.
\r
31 %% This work consists of the main source file aliascnt.dtx
\r
32 %% and the derived files
\r
33 %% aliascnt.sty, aliascnt.pdf, aliascnt.ins, aliascnt.drv.
\r
35 \NeedsTeXFormat{LaTeX2e}
\r
36 \ProvidesPackage{aliascnt}%
\r
37 [2009/09/08 v1.3 Alias counter (HO)]%
\r
38 \newcommand*{\newaliascnt}[2]{%
\r
41 \global\expandafter\let\csname##1#1\expandafter\endcsname
\r
42 \csname##1#2\endcsname
\r
44 \@ifundefined{c@#2}{%
\r
47 \expandafter\@ifdefinable\csname c@#1\endcsname{%
\r
52 \expandafter\gdef\csname AC@cnt@#1\endcsname{#2}%
\r
53 \expandafter\gdef\csname cl@#1\expandafter\endcsname
\r
54 \expandafter{\csname cl@#2\endcsname}%
\r
59 \newcommand*{\aliascntresetthe}[1]{%
\r
60 \@ifundefined{AC@cnt@#1}{%
\r
61 \PackageError{aliascnt}{%
\r
62 `#1' is not an alias counter%
\r
65 \expandafter\let\csname the#1\expandafter\endcsname
\r
66 \csname the\csname AC@cnt@#1\endcsname\endcsname
\r
69 \newcommand*{\AC@findrootcnt}[1]{%
\r
70 \@ifundefined{AC@cnt@#1}{%
\r
73 \expandafter\AC@findrootcnt\csname AC@cnt@#1\endcsname
\r
77 \expandafter\let\csname AC@org@#1reset\expandafter\endcsname
\r
78 \csname @#1reset\endcsname
\r
79 \expandafter\def\csname @#1reset\endcsname##1##2{%
\r
80 \csname AC@org@#1reset\endcsname{##1}{\AC@findrootcnt{##2}}%
\r
83 \RequirePackage{remreset}
\r
85 \AC@patch{removefrom}
\r
88 %% End of file `aliascnt.sty'.
\r