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


Invoking Macros

After a macro is defined (see the previous section), you can use (invoke) it in your document like this:

@macro-name {arg1, arg2, ...}

and the result will be just as if you typed the body of macro-name at that spot. For example:

@macro foo {p, q}
Together: \p\ & \q\.
@end macro
@foo{a, b}

produces:

Together: a & b.

Thus, the arguments and parameters are separated by commas and delimited by braces; any whitespace after (but not before) a comma is ignored. To insert a comma, brace, or backslash in an argument, prepend a backslash, as in

@macro-name {\\\{\}\,}

which will pass the (almost certainly error-producing) argument `\{},' to macro-name.

If the macro is defined to take a single argument, and is invoked without any braces, the entire rest of the line after the macro name is supplied as the argument. For example:

@macro bar {p}
Twice: \p\, \p\.
@end macro
@bar aah

produces:

Twice: aah, aah.


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