summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek/aliascnt.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/aliascnt.sty')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/aliascnt.sty82
1 files changed, 82 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/aliascnt.sty b/Master/texmf-dist/tex/latex/oberdiek/aliascnt.sty
new file mode 100644
index 00000000000..b9a48f30d1d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/oberdiek/aliascnt.sty
@@ -0,0 +1,82 @@
+%%
+%% This is file `aliascnt.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% aliascnt.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file aliascnt.dtx
+%% and the derived files
+%% aliascnt.sty, aliascnt.pdf, aliascnt.ins, aliascnt.drv.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{aliascnt}%
+ [2006/08/16 v1.1 Alias counter (HO)]
+\newcommand*{\newaliascnt}[2]{%
+ \begingroup
+ \def\AC@glet##1{%
+ \global\expandafter\let\csname##1#1\expandafter\endcsname
+ \csname##1#2\endcsname
+ }%
+ \@ifundefined{c@#2}{%
+ \@nocounterr{#2}%
+ }{%
+ \@ifdefinable{c@#1}{%
+ \AC@glet{c@}%
+ \AC@glet{the}%
+ \AC@glet{theH}%
+ \AC@glet{p@}%
+ \expandafter\gdef\csname AC@cnt@#1\endcsname{#2}%
+ \expandafter\gdef\csname cl@#1\expandafter\endcsname
+ \expandafter{\csname cl@#2\endcsname}%
+ }%
+ }%
+ \endgroup
+}
+\newcommand*{\aliascntresetthe}[1]{%
+ \@ifundefined{AC@#1}{%
+ \PackageError{aliascnt}{%
+ `#1' is not an alias counter%
+ }\@ehc
+ }{%
+ \expandafter\let\csname the#1\expandafter\endcsname
+ \csname the\csname AC@cnt@#1\endcsname\endcsname
+ }%
+}
+\newcommand*{\AC@findrootcnt}[1]{%
+ \@ifundefined{AC@#1}{%
+ #1%
+ }{%
+ \expandafter\AC@findrootcnt\csname AC@cnt@#1\endcsname
+ }%
+}
+\def\AC@patch#1{%
+ \expandafter\let\csname AC@org@#1reset\expandafter\endcsname
+ \csname @#1reset\endcsname
+ \expandafter\def\csname @#1reset\endcsname##1##2{%
+ \csname AC@org@#1reset\endcsname{##1}{\AC@findrootcnt{##2}}%
+ }%
+}
+\RequirePackage{remreset}
+\AC@patch{addto}
+\AC@patch{removefrom}
+\endinput
+%%
+%% End of file `aliascnt.sty'.