3.6 Using
wildcards in configuration settings
In a variable-key setting, you can apply
the same value to multiple keys by substituting a wildcard “*” or
“?” for
all or part of the key name, as follows:
- A
question mark can appear anywhere in a key name, substituting for any
one character; multiple question marks substitute for the same number
of characters.
- An
asterisk can appear only at the end of a key name, substituting for one
or more characters, except in element paths, where it can appear anywhere
in the path.
You can use wildcards whenever the key
is a format name or an identifier, provided you have not turned off wildcard
usage (see §4.1.10 Specifying
how to treat cases, spaces, and wildcards). For example, to make
all paragraphs whose format names start with Heading
appear bold and centered in HTML output:
[HTMLParaStyles]
Heading*=Bold Center
You can exclude one or more key names
from a group by listing the exceptions first:
[HTMLParaStyles]
Heading4=
Heading3=Bold Left
Heading*=Bold Center
z????title=Bold Right
*=Left
In this example:
- No
HTML style properties would apply to Heading4
paragraphs.
- Heading3
paragraphs would appear left-aligned and bold in HTML.
- All
remaining Heading*
paragraphs would be centered and bold.
- All
paragraphs whose format names start with z,
followed by any four characters, and end with title,
would be right-aligned and bold.
- Paragraphs
in all other formats would be left-aligned.
DITA2Go applies the first entry
in a section that matches for each key name, so always put the exceptions
before the general case.
Previous Topic:
3.5 Specifying
file paths in configuration settings
Next Topic:
3.7 Commenting
out configuration sections
Parent Topic:
3. Editing configuration files
Sibling Topics:
3.1 Working with DITA2Go
configuration files
3.2 Editing
files with the Configuration Manager
3.3 Understanding
where project settings come from
3.4 Understanding
the rules for configuration settings
3.5 Specifying
file paths in configuration settings
3.7 Commenting
out configuration sections
3.8 Ending
a configuration file
Table of Contents • Index