
ADOBE FRAMEMAKER 10
MIF Reference
39
Within a FrameMaker document, you insert and define variables by choosing Variable from the Special menu. The
variable appears in the document text where it is inserted.
In a MIF file, you define and insert variables as follows:
•
Define and name the document variables by using
VariableFormats
and
VariableFormat
statements.
•
Insert the variable in text by using the
Variable
statement.
Defining user variables
All variable definitions for a document are contained in a single
VariableFormats
statement. The
Variable-
Formats
statement contains a
VariableFormat
statement for each document variable. The
VariableFormat
statement provides the variable name and definition.
<VariableFormats
<VariableFormat
<VariableName `Product Number'>
<VariableDef `A15-24'>
>
# end of VariableFormat
>
# end of VariableFormats
The variable name must be unique; case and spaces are significant. For a user variable, the variable definition can
contain only text and character formats; you can provide any character format defined in the Character Catalog. The
following example applies the default character format Emphasis to a variable:
<VariableFormat
<VariableName `Product Number'>
<VariableDef `<Emphasis\>A15-24<Default ¶ Font\>'>
>
# end of VariableFormat
You can specify character formats as building blocks; that is, the character format name must be enclosed in angle
brackets. Because of MIF parsing requirements, you must use a backslash sequence for the closing angle bracket.
Using system variables
Whenever you open or import a MIF file, the MIF interpreter provides the default system variables. You can redefine
a system variable but you cannot provide new system variables.
System variables are defined by a
VariableFormat
statement. For example, the following statement shows the
default definition for the system variable Page Count:
<VariableFormat
<VariableName `Page Count'>
<VariableDef `<$lastpagenum\>'>
>
# end of VariableFormat
System variables contain building blocks that provide certain information to FrameMaker. These building blocks are
preceded by a dollar sign (
$
) and can only appear in system variables. Some system variables have restrictions on
which building blocks they can contain. These restrictions are discussed in your user’s manual and in the online Help
system. You can add any text and character formatting to any system variable.
Inserting variables
To insert a user variable or a system variable in text, use the
Variable
statement. The following example inserts the
system variable Page Count into a paragraph:
<Para
<ParaLine
<String `This document has '>
<Variable
<VariableName `Page Count'>
Содержание FRAMEMAKER 10
Страница 1: ...MIF Reference ADOBE FRAMEMAKER 10...