##### 18.14.1.2 Mapping DITA files to CHM files

For CHM files other than the default file (see §18.14.1.1 Specifying the default CHM file), specify how DITA files should be mapped to the other CHM files:

    [ChmFiles]
    ; Original or remapped filename (no ext) = chm filename (no ext)
    ;  overrides default set by [MSHtmlHelpOptions]DefaultChmFile
    D:/MyBook/Chapter1 = MyProj

These mappings takes precedence over any default mapping of the same DITA files to the default CHM file.

No file extensions

Do not include file extensions in mappings.

Specify paths to DITA files

It is best to include a path to each DITA file, because you could have several files with the same name in different projects from which you generate different CHM files. Without file paths, you would have no way to differentiate these files. Although you can use either forward slashes or backslashes in paths to DITA files, forward slashes are preferred. DITA2Go uses those cross-reference paths to find the referenced files. See §18.14.1.3 Requiring DITA2Go to use paths for mapped DITA files.

Multiple paths to a single DITA file

To handle several possible paths to the same DITA file, add a line for each path. For example:

    [ChmFiles]
    MyDoc1 = CHMa
    MyDoc2 = CHMb
    .../GroupB/MyDoc2 = CHMb
    G:/test/GroupB/MyDoc2 = CHMb

Avoid paths to CHM files

It is best not to specify paths for CHM files mapped in [ChmFiles], because Microsoft does not allow relative paths to CHM files. Although you can specify an absolute path, absolute paths are not a good idea. You cannot predict where the file will be placed on every system. When no path is specified, HTML Help uses the Windows Registry entry to find the CHM file, provided one of the following is true:

- the CHM file has been used at least once
- the installer created the correct Registry entry for the CHM file.

Previous Topic: 18.14.1.1 Specifying the default CHM file

Next Topic: 18.14.1.3 Requiring DITA2Go to use paths for mapped DITA files

Parent Topic: 18.14.1 Interlinking multiple CHM files

Sibling Topics:

18.14.1.1 Specifying the default CHM file

18.14.1.3 Requiring DITA2Go to use paths for mapped DITA files