### 33.2.6 Assigning a macro or variable to a configuration variable

When you assign a value to a configuration variable, and the value includes the name of a macro or a macro variable, whether or not that name should be enclosed in quotes depends on the context:

• In a *Config marker, a value is always assigned literally, as is, so you can either include or omit quotes around the name of a macro or variable.

• In a macro, a value is assigned literally only if it is enclosed in quotes. If the value includes a macro name, the entire value should be quoted. Such a value may not contain a quote.

For example:

HTMConfig: [StyleCodeAfter]=<$macafter>

HTML Macro: <$$[StyleCodeAfter]="<$macafter>">

Angle brackets get processed in a macro

When you assign a value to a configuration variable in a macro, and the value contains any < or > characters (angle brackets), absent enclosing quotes Mif2Go processes each angle bracket as the start or end of a macro, instead of assigning the entire value as a string. That is, Mif2Go would try to figure out if maybe the string is something else first. When the value includes a > character that it is not in quotes, the macro ends prematurely. In this example:

<$$[StyleCodeAfter]=<hr>>

Mif2Go would assign only <hr to the configuration variable, because the > after <hr would be taken as the end of the macro; and then Mif2Go would drop the real ending > into the current text.

Unquoted variables are evaluated in a macro

When you assign a macro variable to a configuration variable in a macro:

• Enclose the macro variable name in quotes if you want the macro variable to be evaluated later, at run time.

• Do not enclose the macro variable name in quotes if you want the macro variable to be evaluated immediately, so the configuration setting gets the current value of the macro variable instead of just its name.

| 33.2.5 Adding a new configuration setting on the fly |  | 33.2.7 Understanding fixed-key vs. variable-key settings |