Omni Systems, Inc. Mif2Go User's Guide, Version 55
> 35 Producing deliverable results > 35.7 Placing graphics files for distribution > 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:
; CopyGraphicsFrom = path to dir containing graphics files,
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).
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.
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.
You can use GraphCopyFiles
to list files to be copied. Table 35GraphCopyFiles
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
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:
; WrapPath is relative to the project directory:
; CopyGraphicsFrom is relative to the project directory:
CopyGraphicsFrom=..\MyGraphics
; GraphPath is relative to the WrapPath directory:
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
As an alternative, you can collect graphics from multiple locations with a series of system commands in a Mif2Go macro. For example:
SystemWrapCommand=<$GetGraphics>
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.