diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/plain/contrib/misc/declare.tex |
Initial commit
Diffstat (limited to 'macros/plain/contrib/misc/declare.tex')
-rw-r--r-- | macros/plain/contrib/misc/declare.tex | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/macros/plain/contrib/misc/declare.tex b/macros/plain/contrib/misc/declare.tex new file mode 100644 index 0000000000..b97e704bdf --- /dev/null +++ b/macros/plain/contrib/misc/declare.tex @@ -0,0 +1,32 @@ +% File: TeX Inputs declare.tex +% Author: J E Pittman +% Date: September 29, 1988 +% +% Revision 01-Jun-1990 +% Changed count19 to count20 to conform to TeX 3.0 +% - Neil Burleson (NABTEXM@TAMVENUS) +% +% These macros provide a method of locally allocating registers +% without interference with previously allocated registers. The +% method is the same as on pages 346--347 of the \TeX book, however, +% the declare macros are intended for local use only. It is a logical +% error to use a new macro between a declare macro and the end of the +% appropriate enclosing group. +% +\def\declarecount {\allocate0\countdef}% +\def\declaredimen {\allocate1\dimendef}% +\def\declareskip {\allocate2\skipdef}% +\def\declaremuskip{\allocate3\muskipdef}% +\def\declarebox {\allocate4\chardef}% +\def\declaretoks {\allocate5\toksdef}% +% +\def\allocate#1#2#3{\relax + \advance\count1#1 by 1 + \ifnum\count1#1<\count20 + \else + \errmessage{No room for \string#3!}% + \fi + #2#3=\count1#1 + }% +% +\endinput |