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


Defining Macros

You use the Texinfo @macro command to define a macro. For example:

@macro macro-name{param1, param2, ...}
text ... \param1\ ...
@end macro

The parameters param1, param2, ... correspond to arguments supplied when the macro is subsequently used in the document (see the next section).

If a macro needs no parameters, you can define it either with an empty list (`@macro foo {}') or with no braces at all (`@macro foo').

The definition or body of the macro can contain any Texinfo commands, including previously-defined macros. (It is not possible to have mutually recursive Texinfo macros.) In the body, instances of a parameter name surrounded by backslashes, as in `\param1\' in the example above, are replaced by the corresponding argument from the macro invocation.

You can undefine a macro foo with @unmacro foo. It is not an error to undefine a macro that is already undefined. For example:

@unmacro foo


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