40.2.2.1.2 Substituting files with different names or locations

You can tell DITA2Go to look for replacement files that differ from the original files in any or all of the following respects:

To map referenced graphics to replacements:

[Graphics]
; FileNames = Retain (default) or Map (in the GraphFiles section)
; FilePaths (for graphics) = Retain (default) or None (strip off)
FileNames=Map

To specify different file paths, different names, or different extensions, when FileNames=Map:

[GraphFiles]
; types to map, replace extension, old=new for referenced graphics
; specific filenames to replace, old = new, overrides type setting

Note:  When you specify paths in [GraphFiles], use forward slashes for separators.

Table 40-1 shows where DITA2Go expects to find replacement files for various combinations of FileNames and FilePaths values and [GraphFiles] settings.

Table 40-1 RTF replacement graphics file mappings and locations

FileNames

Valid [GraphFiles] mappings

Replacement directory when FilePaths =

Original graphics file(s)

=

Replacement file(s)

Retain

None

Retain

Ignored

 

 

Original

Output

Map

ext

=

ext

Original

Output

filename.ext

=

filename.ext

Output

Output

path/filename.ext

=

filename.ext

Output

Output

filename.ext

=

path/filename.ext

Per [GraphFiles] path

path/filename.ext

=

path/filename.ext

Per [GraphFiles] path

FileNames=Map

When FileNames=Map, DITA2Go uses the settings in [GraphFiles] to find replacements.

FileNames=Retain

When FileNames=Retain, DITA2Go ignores the settings in [GraphFiles], and looks for replacements in one of two places (determined by the FilePaths setting): the same directory as the original graphics, or the project directory.

FilePaths=None

When FilePaths=None, DITA2Go ignores the path component of the file references in DITA. Unless you specify FileNames=Map and a different path in [GraphFiles], DITA2Go looks for replacements only in the project directory.

You can use FilePaths=None when you are converting on a system different from the system used for authoring or editing, to avoid replicating the directory structure. This setting prevents problems with attempted access to drives (such as network drives) that do not exist on the system used for conversions, but do exist on the systems used for authoring or editing.

FilePaths=Retain

When FilePaths=Retain, unless you specify FileNames=Map and different paths for both original and replacement files in [GraphFiles], DITA2Go looks for replacement graphics only in the same directory as the original files.

Avoid specifying original file paths

It is best to use FilePaths=None, and put the replacements in the project directory. This is because specifying original file paths in [GraphFiles] is problematic; success depends on exactly matching the paths in DITA, whether they are absolute or relative.

Previous Topic:  40.2.2.1.1 Substituting files with different extensions

Next Topic:  40.2.2.1.3 Understanding replacement examples

Parent Topic:  40.2.2.1 Substituting graphics files for RTF

Sibling Topics:

40.2.2.1.1 Substituting files with different extensions

40.2.2.1.3 Understanding replacement examples

Table of ContentsIndex