#### 42.2.4 Assigning values to configuration variables

A configuration-variable assignment can be any of the following, depending on the context and the extent of the configuration override:

Context | Persistent override | Temporary override
*Config PI marker |
    [Section]Key=Value
    [Section]=Value
DITA2Go macro |
    $$[Section]Key=Value
    $$[Section]=Value

where the components of the assignment are as follows: :

Section | Name of the configuration-file section where the setting belongs
Key | Keyword whose value you want to change, or the format or object whose properties you want to change; omit for temporary overrides
Value | New value for the setting.

When you assign a value to a configuration variable, observe the following:

- Spaces around [Section] are optional.
- Section is not case sensitive.
- In a macro, [Section] must be prefixed with $$; in a *Config PI marker, the prefix is optional.
- Include Key only for a persistent override; see §42.2.1 Determining the extent of a configuration override.
- Key is case sensitive for variable-key settings.
- Key may not use wildcards.
- Key must be enclosed in quotes if Key contains any spaces or non-alphanumeric characters.
- If Key requires an on/off value, DITA2Go recognizes “1” (numeral one), “Yes”, and “True” as on, and “0” (zero), “No”, and “False” as off.
- In a macro, if Value is a text string, Value must be enclosed in quotes. In a *Config PI marker, quotes around text values are optional; if present, DITA2Go removes them. Therefore, if the value to be assigned actually contains quotes at both ends, you must double them for assignment in a *Config PI marker. For example:

      HTMConfig: [StyleTextStore]=""a quoted phrase""

- If Value includes the name of a macro or macro variable, whether that name should be enclosed in quotes depends on the context; see §42.2.6 Assigning a macro or variable to a configuration variable.

Previous Topic: 42.2.3 Overriding settings with macros

Next Topic: 42.2.5 Adding a new configuration setting on the fly

Parent Topic: 42.2 Overriding settings with PI markers or macros

Sibling Topics:

42.2.1 Determining the extent of a configuration override

42.2.2 Overriding settings with configuration PI markers

42.2.3 Overriding settings with macros

42.2.5 Adding a new configuration setting on the fly

42.2.6 Assigning a macro or variable to a configuration variable

42.2.7 Understanding fixed-key vs. variable-key settings

42.2.8 Overriding fixed-key configuration settings

42.2.9 Overriding variable-key configuration settings

42.2.10 Assigning HTML table and graphic groups with overrides