37.1.1.1 Understanding
what a macro definition can include
Macros can include more than simple
code:
- For
HTML output a macro can contain HTML code, JavaScript, or anything else
printable that follows the rules of whatever language you are using.
- For
RTF output, a macro can insert Field content.
- For
all types of output, a macro can specify Windows system commands, provided
double any backslashes and enclose paths that contain spaces in double
quotes; see §43.1.5
Supplying system commands in a macro.
A macro can be any length. You can define
macros to use as “building blocks” for other macros. There
is no limit to the number of macros you can define for a project.
Note: You do not
have to define every string of code as a macro. Any place in the
configuration file where you can use a macro, you can also use plain
HTML or RTF code, provided you include the entire code string on one
line.
Whether you use a formal named macro
definition or an informal string of code, for HTML output DITA2Go
always inserts an extra line break in the output immediately before the
expanded macro. This is so you can readily identify macro-supplied code,
for ease in correcting any errors in your macro settings. Browsers ignore
the extra line break.
Previous Topic:
37.1.1 Defining
macros
Next Topic:
37.1.1.2 Understanding
where you can define named macros
Parent Topic:
37.1.1 Defining
macros
Sibling Topics:
37.1.1.2 Understanding
where you can define named macros
37.1.1.3 Escaping
special characters in macro definitions
37.1.1.4 Managing
line breaks in macro definitions
37.1.1.5 Including
comments in macro definitions
37.1.1.6 Obtaining
RTF code for macro definitions
Table of Contents • Index