Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

35 Producing deliverable results > 35.7 Placing graphics files for distribution > 35.7.2 Selecting graphics to copy from arbitrary locations


35.7.2 Selecting graphics to copy from arbitrary locations

In addition to (or instead of) having Mif2Go gather up copies of the graphics files referenced by your FrameMaker document (see §35.7.1 Copying referenced graphics to a distribution directory), you can have Mif2Go copy all or selected graphics files from other locations.

The paths in your FrameMaker document point to the images used during authoring. But different output types require different image formats, so if an image is in the right format for HTML, it is wrong for RTF. You can choose, on a per-project basis, which set of images you want by selecting where to copy them from.

To specify which graphics files to copy and from where:

[Automation]

; CopyGraphicsFrom = path to dir containing graphics files,

;  relative OK

CopyGraphicsFrom = path\to\graphics\files

; GraphCopyFiles = list of files to copy from CopyGraphicsFrom,

;  from project directory, and from arbitrary locations.

GraphCopyFiles = *.gif *.jpg G:\special\images\logo.png

CopyGraphicsFrom and GraphCopyFiles take effect when WrapAndShip=Yes, CompileHelp=Yes, or FTSCommand=path\to\indexer (see §35.10 Gathering and processing Help-system files).

Where to get graphics files

When you specify a value for CopyGraphicsFrom, graphics files are copied first from the project directory (unless it is the same as the destination directory), then from the directory designated by CopyGraphicsFrom, to one of the destinations listed in §35.7.1 Copying referenced graphics to a distribution directory. If you specify a relative path for CopyGraphicsFrom, that path is relative to the project directory.

Where to put graphics files

The CopyGraphicsFrom command happens just before the CopyOriginalGraphics command (see §35.7.1 Copying referenced graphics to a distribution directory), and copies to the same place. When WrapAndShip=Yes, that place is the concatenation of the wrap directory (if any) and the value of [Graphics]GraphPath. If no value is specified for GraphPath, files are copied to the wrap directory; if no value is specified for WrapPath, files are copied to a concatenation of the project directory and GraphPath; if neither is specified, files are copied to the project directory.

Which graphics files to copy

You can use GraphCopyFiles to list files to be copied. Table 35-3 shows which graphics files are copied by default for each output type. Files without paths assigned to GraphCopyFiles are always copied first from the project directory, then from the CopyGraphicsFrom directory (if any). If GraphCopyFiles is not specified, or is set to nothing, all relevant graphics files are copied from the project directory and then from the CopyGraphicsFrom directory (if any).

Table 35-3 Default graphics files copied for assembly

Output type

Files copied by default from project directory

DCL, MIF

*.bmp *.wmf *.gif *.jpg *.png *.svg *.tif

HTML, XML types

*.gif *.jpg *.png *.svg

RTF types

*.bmp *.wmf

The file specifications you assign to GraphCopyFiles must be separated by spaces, and no spaces are allowed within a file specification. You can use wildcards in file specifications, and include absolute or relative paths to indicate where graphics files should be copied from. If you do not specify a path, the default is first from the project directory, then from the CopyGraphicsFrom directory (if any). If you specify a relative path, the path is relative to the project directory.

For example, to have Mif2Go copy graphics files for standard HTML output from directory MyGraphics, parallel to the project directory, to directory Images, a subdirectory of the WrapPath directory:

[Automation]

WrapAndShip=Yes

; WrapPath is relative to the project directory:

WrapPath=.\Final

; CopyGraphicsFrom is relative to the project directory:

CopyGraphicsFrom=..\MyGraphics

[Graphics]

; GraphPath is relative to the WrapPath directory:

GraphPath=./images

If you use backslashes for GraphPath, Mif2Go changes them to forward slashes before inserting references in HTML output, from HTML files to image files. See §23.3 Locating graphics files for HTML.

Synchronize with other settings

If you plan to use CopyGraphicsFrom, make sure other graphics settings in the configuration file are consistent with the setting for WrapPath. See:

§35.7.4 Synchronizing graphics settings for HTML output

§35.7.5 Synchronizing graphics settings for RTF output

Use system commands instead

As an alternative, you can collect graphics from multiple locations with a series of system commands in a Mif2Go macro. For example:

[Automation]

SystemWrapCommand=<$GetGraphics>

[GetGraphics]

cd <$$_currpath>\\wrap

copy "c:\\my graphics\\*.jpg"

copy "c:\\more graphics\\*.jpg"

Notice the doubled backslashes (required in Mif2Go macros, where backslash is used as an escape character), and the quotes around paths that includes spaces; see §34.4.6 Supplying system commands in a macro.



35 Producing deliverable results > 35.7 Placing graphics files for distribution > 35.7.2 Selecting graphics to copy from arbitrary locations