A macro is a command which can be embedded within SDF. Macros begin with an exclamation mark (!) as the first non-whitespace character on a line. Some examples are:
!use "delphi" !define DOC_AUTHOR "Joe Bloggs" !build_title
Some commonly used macros are given below.
|init variables||initialise variables|
|define variable [expression]||set a variable's value|
|build_title||build a title page|
|block filter||begin a block of text|
|endblock||end a block of text|
|include file[; filter]||include another file|
|import file[; parameters]||import a figure|
A complete list of the supported macros and their parameters is given in the SDF Reference manual.
!macro MY_MACRO This text will appear whenever the author calls !MY_MACRO. !endmacro
Macros can also be implemented by a Perl subroutine which generates the SDF text to be inserted when the macro is called. See the SDF Guru Guide for further details.