|
Macros and environment variables |
|
The main key-combinations that you should know to write style files
are the following:
-
M-i =
-
creates a new assignment. The first argument is a new command name
and the second argument an expression.
-
M-i w
-
permits to locally change one or more environment variables. With
statements are of the form
⟨x1|a1|⋯|xn|an|b⟩,
where the xi are the names of the
variables, the ai their local
values, and b the text on which the local environment
applies.
-
M-i m
-
creates a macro. Arguments to the macro can be inserted using the
tab-key.
-
M-i #
-
get the value of a macro argument.
-
M-i v
-
get the value of an environment variable.
-
M-i e
-
expands the macro with zero or more arguments.
More precisely, when evaluating a macro expansion
{a|x1|⋯|xn}
created by M-i e, the following action is undertaken:
-
If a is not a string nor a macro, then a is
evaluated once. This results either in a macro name or a macro
expression f.
-
If we obtain a macro name, then we replace f by the value
of the environment variable f. If, after this,
f is still not a macro expression, then we return
f.
-
Let
y1,…,yn
be the arguments of f and b it's body
(superfluous arguments are discarded; missing arguments take the
empty string as their default value). Then we substitute
xi for each
yi in b and return the
evaluated result.
© 1998–2002 Joris van der Hoeven
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License".