summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty
blob: 9d1c828f0d15ee4a5c2087cb7b90a5875a0e345c (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
%%
%% This is file `aliasctr.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% aliasctr.dtx  (with options: `code')
%% This is a generated file.
%% 
%% This file is part of the `thmtools' package.
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%% 
%% Copyright (C) 2008-2014 by Ulrich M. Schwarz.
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, version 1.3a.
%% This version is obtainable at
%% http://www.latex-project.org/lppl/lppl-1-3a.txt
%% 
%% 
\NeedsTeXFormat {LaTeX2e}
\ProvidesPackage {aliasctr}[2014/04/21 v66]
\def\aliasctr@f@llow#1#2\@nil#3{%
  \ifx#1\@elt
  \noexpand #3%
  \else
  \expandafter\aliasctr@f@llow#1\@elt\@nil{#1}%
  \fi
}
\newcommand\aliasctr@follow[1]{%
  \expandafter\aliasctr@f@llow
  \csname cl@#1\endcsname\@elt\@nil{\csname cl@#1\endcsname}%
}
\renewcommand*\@addtoreset[2]{\bgroup
   \edef\aliasctr@@truelist{\aliasctr@follow{#2}}%
  \let\@elt\relax
  \expandafter\@cons\aliasctr@@truelist{{#1}}%
\egroup}
\RequirePackage{remreset}
\renewcommand*\@removefromreset[2]{\bgroup
  \edef\aliasctr@@truelist{\aliasctr@follow{#2}}%
  \expandafter\let\csname c@#1\endcsname\@removefromreset
  \def\@elt##1{%
    \expandafter\ifx\csname c@##1\endcsname\@removefromreset
    \else
      \noexpand\@elt{##1}%
    \fi}%
  \expandafter\xdef\aliasctr@@truelist{%
    \aliasctr@@truelist}
\egroup}
\newcommand\@counteralias[2]{{%
    \def\@@gletover##1##2{%
      \expandafter\global
      \expandafter\let\csname ##1\expandafter\endcsname
      \csname ##2\endcsname
    }%
    \@ifundefined{c@#2}{\@nocounterr{#2}}{%
      \@ifdefinable{c@#1}{%
        \@@gletover{c@#1}{c@#2}%
        \@@gletover{the#1}{the#2}%
        \@@gletover{theH#1}{theH#2}%
        \@@gletover{p@#1}{p@#2}%
        \expandafter\global
        \expandafter\def\csname cl@#1\expandafter\endcsname
        \expandafter{\csname cl@#2\endcsname}%
        %\@addtoreset{#1}{@ckpt}%
      }%
    }%
}}
\endinput
%%
%% End of file `aliasctr.sty'.