Omni Systems, Inc.

  

Mif2Go User's Guide, Version 33u53

  

Valid HTML 4.01!

 

Made with Mif2Go

4 Setting configuration options > 4.1 Editing a Mif2Go configuration file > 4.1.4 Understanding the rules for configuration settings


4.1.4 Understanding the rules for configuration settings

A configuration file is a plain ASCII text file, with file extension .ini. When Mif2Go creates a configuration file for you, Mif2Go writes a couple of header lines as comments. However, header text is not required.

A configuration file contains a series of sections. Each section consists of a section name in square brackets, followed by a list of settings of the form Key=Value or Key=Command, each on a separate line; and possibly by one or more comments:

[Section]

Key = Value

Key = Value1 Value2 Value3 ...

Key = Command

; Comment

Section names must be unique

Section names must be unique. If you use the same section name twice in your configuration file, only the first section is processed. Otherwise, order of sections does not matter, except for macro sections (see §27.1.1.2 Understanding where you can define named macros).

Keys names must be unique

Each Key= setting in a given section must be the only setting for that key in that section. A common error is to add a setting to a section that already has a setting for that key. For example, any repeated lines assigning additional values to the same format name are ignored; only the first line is processed. Instead, place any additional values on the same line as the first, separated by spaces.

Fixed-key vs. variable-key sections

Configuration files contain two kinds of sections: those with fixed keys (key names predefined by Mif2Go) and those with variable keys. For example, sections such as [HTMLOptions] and [WordOptions] are for settings with fixed key names; sections such as [HtmlStyles] and [HelpStyles] are for settings with key names you specify, typically names of FrameMaker formats.

Order of settings

In a fixed-key section, the order of settings does not matter. Order is important only in sections where you can use variable keys, and then only if you use wildcards in key names (see §4.1.6 Using wildcards in configuration settings).

Formats must be in catalogs

Often the variable-key names you specify are names of formats in your FrameMaker document, such as paragraph, character, or table formats. Make sure each format you use for a key name actually appears in the appropriate catalog in FrameMaker; Mif2Go cannot process formats that are not in a FrameMaker catalog.

Multiple values are separated by spaces

Some variable-key sections allow multiple values for each key: sections such as [HtmlStyles], [WordStyles], and [HelpStyles], where you can assign multiple properties to each FrameMaker format. Use spaces between values.

Key names are not case sensitive by default

Comparisons of key names are caseless, unless you turn on case sensitivity; see §4.2.8 Specifying how to treat cases, spaces, and wildcards. (However, when you override a configuration setting with a configuration variable, the key name is case sensitive; see §31.2.4 Assigning values to configuration variables.)

Key names must be valid ASCII

All ASCII characters are valid in key names, with the following exceptions:

"?" and "*" are treated as wildcards, unless you turn off wildcard usage; see §4.2.8 Specifying how to treat cases, spaces, and wildcards. (However, when you override a configuration setting with a configuration variable, Mif2Go does not recognize wildcards in the key name; see §31.2.4 Assigning values to configuration variables.)

";" or "[" must be prefixed with escape character "\" if you want to start a key name with either of these characters.

Spaces and tabs: some retained, some removed

Mif2Go treats spaces and tabs in configuration settings as follows:

Spaces and tabs before the Key and before the equal sign are ignored, unless [Options]SpacelessMatch=No, in which case those before the Key are not ignored (see §4.2.8 Specifying how to treat cases, spaces, and wildcards).

If the equal sign is followed by one or more spaces or tabs, the first such space or tab is removed, and the rest are retained in the output.

All spaces and tabs that follow a value are retained in the output.

Comments start with a semicolon

Lines that start with a semicolon ";" are comments. For a line to be treated as a comment, the semicolon must be the first character on the line (no leading blanks or tabs). Mif2Go pays no attention to comment lines; you can use them to add your own notes. However, do not try to "comment out" a section by inserting a ";" in front of the section name; all settings that follow such a line, up to the next line that starts with a "[", would be added to the settings for the preceding section. Comments are never required.

Boolean values

For an on/off value, Mif2Go recognizes "1" (numeral one), "Yes", and "True" as on, and "0" (zero), "No", and "False" as off.

Size limit on Windows 9x/ME

You can specify as many unique settings as you like in a section. However, on Windows 95/98 and Windows ME systems, you are limited to 32KB worth of settings per section. This limitation does not exist on Windows NT, Windows 2000, or Windows XP.



4 Setting configuration options > 4.1 Editing a Mif2Go configuration file > 4.1.4 Understanding the rules for configuration settings