### 42.3 Overriding configuration settings with text

To override configuration settings on the fly, you can include a configuration setting in your document as text, give it a unique paragraph format, and assign that format a special property. This method is an alternative to inserting Config or HTMConfig or RTFConfig PI markers in your document, and it works the same way. See §42.2.2 Overriding settings with configuration PI markers.

To make a paragraph act as a configuration override:

    [HTMLParaStyles] or [WordStyles] or [HelpStyles]
    ; Config (and HTMConfig or RTFConfig) use the contents of the para as
    ;  though it is a set of Config markers, each ending with a hard
    ;  return, but also allow the normal .ini syntax with [Sections] on
    ;  their own lines, and comments.
    ParaFmt = Config Delete

Property HTMConfig is effective only in HTML output types, property RTFConfig is effective only in RTF output types, and where applicable, property Config is effective in both.

When you also assign property Delete, DITA2Go removes the paragraph from the actual text stream, so the text does not appear in the output.

The content of each paragraph in a format assigned the Config (or HTMConfig or RTFConfig) property is treated as a configuration override, or a series of configuration overrides, provided the content:

- conforms to configuration syntax
- specifies settings that are subject to overrides.

See §42.2.7 Understanding fixed-key vs. variable-key settings.

You have two choices of syntax for *Config paragraph content; you can intermix them in the same paragraph:

File syntax: | Make the paragraph look like a configuration-file section, with a hard return at the end of each line (although a hard return is not required after the last line). You can include multiple configuration sections, and also include comment lines that start with a semicolon; see §3.4 Understanding the rules for configuration settings.
Marker syntax: | Use the same syntax as for *Config PI markers; see §42.2.4 Assigning values to configuration variables. Place a hard return at the end of each override.

For example, a *Config paragraph that precedes an anchored frame that contains a graphic might provide the name of a different graphic to substitute for the one in your document:

    [GraphFiles]
    =Screen1.gif

The content of the paragraph could just as well look like this:

    [GraphFiles]=Screen1.gif

The result works exactly like the same content put in PI markers at the same location in your document.

Previous Topic: 42.2.10 Assigning HTML table and graphic groups with overrides

Next Topic: VII. Project workflow automation

Parent Topic: 42. Overriding configuration settings

Sibling Topics:

42.1 Using a different configuration for selected files

42.2 Overriding settings with PI markers or macros

Table of Contents • Index