Macro expansion refers to the process of taking a macro invocation and replacing it with the output of the macro. In Remark, this process can be carried out in different ways depending on the need.
In a macro invocation the user has explicit control over
whether the macros in the parameter should be recursively expanded before invoking the macro, and
whether the output of the macro expansion should be recursively expanded.
These behaviors can be set by using a pair of signs (+ or -) before the name of the macro. In this notation + means yes and - means no. The first sign refers to the expansion of the output, while the second sign refers to the expansion of the parameter. For example, the following invocation of the Verbatim macro explicitly disables the expansion of the output and enables the expansion of the parameter.
[[-+Verbatim]]: [[tag description]]
Macro expansion
If only one sign is given, then that sign is assumed for both expansions, i.e. - = – and + = ++.
If the expansion signs are not given, then the expansions assume default behaviors. The default behavior for parameter expansion is not to do it. The default behavior for output expansion is determined by the invoked macro.
The macros can be placed freely as shown in the following example:
[[set b: Nom]]Nom[[b]] [[b]]Nom[[b]] Nom[[b]]
NomNom NomNomNom NomNom