Go to the first, previous, next, last section, table of contents.

Allocation macros

Plain TeX provides macros that allocate registers of each primitive type in TeX, to prevent different sets of macros from using the same register for two different things. The macros are all named starting with `new', e.g., \newcount allocates a new "count" (integer) register. Such allocations are usually needed only at the top level of some macro definition file; therefore, plain TeX makes the allocation registers \outer, to help find errors. (The error this helps to find is a missing right brace in some macro definition.)

Sometimes, however, it is useful to allocate a register as part of some macro. An outer control sequence cannot be used as part of a macro definition (or in a few other contexts: the parameter text of a definition, an argument to a definition, the preamble of an alignment, or in conditional text that is being skipped). Therefore, Eplain defines "inner" versions of all the allocation macros, named with the prefix `inner': \innernewbox, \innernewcount, \innernewdimen, \innernewfam, \innernewhelp, \innernewif, \innernewinsert, \innernewlanguage, \innernewread,
\innernewskip, \innernewtoks, \innernewwrite.

You can also define non-outer versions of other macros in the same way that Eplain defines the above. The basic macro is called \innerdef:

\innerdef \innername {outername}

The first argument (\innername) to \innerdef is the control sequence that you want to define. Any previous definition of \innername is replaced. The second argument (outername) is the characters in the name of the outer control sequence. (You can't use the actual control sequence name, since it's outer!)

If the outer control sequence is named \cs, and you want to define innercs as the inner one, you can use \innerinnerdef, which is just an abbreviation for a call to \innerdef. For example, these two calls are equivalent:

\innerdef\innerproclaim{proclaim}
\innerinnerdef{proclaim}

Go to the first, previous, next, last section, table of contents.