This section introduces macro invocation.
A macro can be invoked explicitly in four ways:
To introduce invocation, we shall take the Comment macro as an example.
[[Comment]]
[[Comment: This is an inline parameter.]]
[[Comment]]: This is a one-line parameter.
[[Comment]]:
This is a multi-line parameter
which can use as many rows as needed.
The parameter is multi-line if and only if
A macro is invoked implicitly if and only if
The invoked macro, called the indentation macro, is
specified by the indent
variable. This variable may also
contain expansion specifiers. By default, indent
is set
to Verbatim
, to invoke the Verbatim macro.
However, depending on the field of study, it may be more
useful to set the indentation macro to the Code
macro or the EquationSet macro.
[[set indent]]: EquationSet
The solution of the quadratic equation
ax^2 + bx + c = 0
is given by
x = (-b +- sqrt(b^2 - 4ac)) / (2a)
The solution of the quadratic equation
is given by
The range of a multi-line parameter extends downwards until there is a line which contains non-white-space characters and which has indentation (counted in tabs) equal to or less than the indentation of the macro invocation.
[[Comment]]:
This is a multi-line parameter
which can use as many rows as needed.
This is still part of the multi-line parameter.
This is not part of the Comment parameter.
This is not part of the Comment parameter.
All styles of invocation are equivalent by the following rules: