#### 37.1.2 Invoking a macro

To invoke a macro, insert its name, enclosed in a <$ > tag:

    <$Macroname>

The dollar sign at the start of the tag is not valid in HTML, so it will not interfere with any real HTML (or XML) code. A space after the dollar sign is optional. When DITA2Go sees a macro name, it replaces the tag with the macro content.

You can invoke a macro:

- as all or part of the value in certain key=value configuration settings; see §37.9.1 Understanding where to use macros and macro variables.
- in an HTML Macro PI marker; see §37.9.5 Using HTML Macro PI markers to invoke macros.

Wherever you can invoke a macro, you can also supply plain HTML. You do not have to name and define strings of HTML code that you expect to include in only one place.

Invoking an undefined macro

DITA2Go ignores the invocation of any macro for which no definition can be found, unless you specify a special debugging option; see §37.8 Debugging macros. You can take advantage of this behavior to set up a series of alternatives, then selectively enable only the ones you want for a given conversion project by renaming (or moving) macro library files. See §37.2.4 Including macro definitions in your own macro library.

Previous Topic: 37.1.1.6 Obtaining RTF code for macro definitions

Next Topic: 37.1.3 Nesting macros

Parent Topic: 37.1 Defining and invoking macros

Sibling Topics:

37.1.1 Defining macros

37.1.3 Nesting macros

37.1.4 Using predefined macros

Table of Contents • Index