Permalink
Cannot retrieve contributors at this time
AADLPaper_CANS/aliascnt.sty
Go to file%% | |
%% 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. | |
%% | |
%% Project: aliascnt | |
%% Version: 2009/09/08 v1.3 | |
%% | |
%% Copyright (C) 2006, 2009 by | |
%% Heiko Oberdiek <heiko.oberdiek at googlemail.com> | |
%% | |
%% 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.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}% | |
[2009/09/08 v1.3 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}% | |
}{% | |
\expandafter\@ifdefinable\csname c@#1\endcsname{% | |
\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@cnt@#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@cnt@#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'. |