| 1 |
|
| 2 |
% remreset package |
| 3 |
%%%%%%%%%%%%%%%%%% |
| 4 |
|
| 5 |
% Copyright 1997, 2018 David carlisle |
| 6 |
% This file may be distributed under the terms of the LPPL. |
| 7 |
% See README.txt for details. |
| 8 |
|
| 9 |
% 2018/04/01 David Carlisle |
| 10 |
% 1997/09/28 David Carlisle |
| 11 |
|
| 12 |
% LaTeX includes a command \@addtoreset that is used to declare that |
| 13 |
% a counter should be reset every time a second counter is incremented. |
| 14 |
|
| 15 |
% For example the book class has a line |
| 16 |
% \@addtoreset{footnote}{chapter} |
| 17 |
% So that the footnote counter is reset each chapter. |
| 18 |
|
| 19 |
% If you wish to base a new class on book, but without this counter |
| 20 |
% being reset, then standard LaTeX gives no simple mechanism to do |
| 21 |
% this. |
| 22 |
|
| 23 |
% This package defines |\@removefromreset| which just undoes the effect |
| 24 |
% of \@addtoreset. So for example a class file may be defined by |
| 25 |
|
| 26 |
% \LoadClass{book} |
| 27 |
% \@removefromreset{footnote}{chapter} |
| 28 |
|
| 29 |
% 2018: package obsoleted as the command is defined in the LaTeX format. |
| 30 |
|
| 31 |
\@ifundefined{@removefromreset}{% |
| 32 |
\def\@removefromreset#1#2{{% |
| 33 |
\expandafter\let\csname c@#1\endcsname\@removefromreset |
| 34 |
\def\@elt##1{% |
| 35 |
\expandafter\ifx\csname c@##1\endcsname\@removefromreset |
| 36 |
\else |
| 37 |
\noexpand\@elt{##1}% |
| 38 |
\fi}% |
| 39 |
\expandafter\xdef\csname cl@#2\endcsname{% |
| 40 |
\csname cl@#2\endcsname}}}% |
| 41 |
}{% |
| 42 |
\PackageWarningNoLine{remreset} |
| 43 |
{The remreset package is obsolete:\MessageBreak |
| 44 |
\noexpand\@removefromreset is defined}% |
| 45 |
} |
| 46 |
|
| 47 |
|