Adobe FRAMEMAKER 6.0 User Manual

Adobe
®
®
FrameMaker
6.0
MIF Refer ence Online M anual
Adobe, the Adobe logo, Acrobat, Acrobat Reader, Adobe Type Manager, ATM, Display PostScript, Distiller , Exchange, Frame, FrameMaker, FrameViewer, InstantView , and PostScript are trademarks of Adobe Systems Incorporated. Apple, PowerBook, QuickTime, Mac, Macintosh and Power Macintosh are trademarks of Apple Computer, Inc., registered in the United States and other countries. HP -UX i s a registere d trademark of Hewl ett-P ackard Com pany . Micr osoft, MS-DOS, W indo ws, and Win dows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.. Sun and Solaris are trad emarks or r egis ter ed tradema rks of S un M icr osyst ems , I nc. in t he United St at es an d othe r c oun tries. U ni x is a r egis­tered trademark and X
© 2000 Adobe Syste ms Incorporated. All rights reserved.
Window Syst em is a trade mark of Th e Open Gr oup . All other trademarks ar e pr operty of their r especti ve o wners.

Contents

Introduction Why use MIF? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Using this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Overview of MIF statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
MIF statement syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Using MIF Statements Working with MIF files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Creating a simple MIF file for FrameMaker . . . . . . . . . . . . . . . . . . . . . . . . . 18
Creating and applying character formats . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Creating and formatting tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Specifying page layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Creating markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Creating cross-references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Creating variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Creating conditional text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Including template files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Setting View Only document options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Applications of MIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Debugging MIF files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Other application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Where to go from here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3
MIF Document Statements
MIF file layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
MIFFile statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Control statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Macro statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Conditional text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Paragraph formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Character formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Cross-references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Global document properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Graphic objects and graphic frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Text flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Text insets (text imported by reference) . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Publishers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
MIF Book File Statemen ts MIF book file overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
MIF book file identification line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Book statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
4
MIF Statements for Structured Documents and Books
Structural element definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Attribute definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Format rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Format change lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Preference settings for structured documents . . . . . . . . . . . . . . . . . . . . . . 180
Text in structured documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Structured book statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
MIF Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
MIF Equation Statements Document statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Math statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
MathFullForm statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
MIF Asian Text Processing Statements
Asian Character Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Combined Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Kumihan Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Rubi text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Examples Text example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Bar chart example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Pie chart example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Custom dashed lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Table examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Database publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
MIF Messages General form for MIF messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
List of MIF messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
MIF Compatibility Changes between version 5.5 and 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Changes between version 5 and 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Changes between versions 4 and 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Changes between versions 3 and 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
5
Facet Formats for Graphics
Facets for imported graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Basic facet format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Graphic insets (UNIX versions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
General rules for reading and writing facets . . . . . . . . . . . . . . . . . . . . . . . 278
EPSI Facet Format Specification of an EPSI facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Example of an EPSI facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
FrameImage Facet Format
FrameVector Facet Format
Specification of a FrameImage facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Specification of FrameImage data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Differences between monochrome and color . . . . . . . . . . . . . . . . . . . . . . . 285
Sample unencoded FrameImage facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Sample encoded FrameImage facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Specification of a FrameVector facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Specification of FrameVector data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Sample FrameVector facet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

Introduction

6
MIF (Maker Interchange Format) is a group of ASCII statements that create an easily parsed, readable text file of all the text, graphics, formatting, and layout constructs that most FrameMaker exception of FrameReader document, it allows FrameMaker products and other applications to exchange information while preserving graphics, document content, and format.
®
) understand. Because MIF is an alternative representation of a FrameMaker
®
products (with the

Why use MIF?

You can use MIF file s to a llo w Frame Ma k er pr oducts an d othe r appli cation s to e x c hange i nfo rmation. Fo r example, you can write programs to convert graphics and text into MIF and then import the MIF file into a FrameMaker product with the graphics and text intact. You can also save a FrameMaker document or book file as a MIF file and then write a program to convert the MIF file to another format. These conversion programs are called filters; filters allow you to convert FrameMaker document files into foreign files (files in another word processing or desktop publishing format), and foreign files into FrameMaker document files.
You can use MIF files with database publishing applications, which allow you to capture changing data from databases and format the data into high-quality documents containing both text and graphics infor­mation. Y ou use the database to enter, manipulate, sort, and select data. You use a FrameMaker product to format the resulting data. You use MIF files as the data interchange format between the database and the FrameMaker product.
You can also use MIF files to do the following:
Share documents with earlier versions of FrameMaker products
Perform custom document proc essing
Set options for online documents in View Only format
These tasks are described in “Applications of MIF” on page 60 perform some of these tasks. See “Other application tools” on page 64
. You can use other FrameMaker products to
.

Using this manual

This manual:
Describes the layout of MIF files.
Provides a complete description of each MIF statement and its syntax.
Provides examples of how to use MIF statements.
Includes MIF statements for version 5.5 of the following FrameMaker products: FrameMaker
FrameViewer®, FrameMaker+SGML™.
®,
Introduction
Y our FrameMaker pr oduct may not include all of the features described in this manual. For example, some statements appear in all MIF files but are only applicable for structured documents created with FrameMaker+SGML. Contact your FrameMaker local customer service representative for information about other FrameMaker products.
T o get the most from this manual you should be familiar with your FrameMaker product. For information about a FrameMaker product and its features, see the documentation for your product. In addition, if you are using MIF as an interchange format between a FrameMaker product and another application, you should be f amiliar with the tools needed to create and manipulate the other application, such as a programming language or database query language.
This chapter provides basic information about working with MIF files, including opening and saving MIF files in your FrameMaker product. It goes on to provide detailed information about the MIF language and its syntax.
7ADOBE FRAMEMAKER 6.0
For an introduction to writing MIF files, read , “Using MIF Statements.”
You can then use the statement index, subject index, and table of contents to locate more specific information about a particular MIF statement.
For a description of a MIF statement, use the table of contents or statement index to locate the statement. For a description of the differences between the MIF statements for this version of your FrameMaker
product and earlier versions, see ,“MIF Compatibility.”
Style conventions
This manual uses different fonts to represent different types of information.
What you type is shown in
.
MIF statement names, pathnames, and filenames are also shown in
.
Placeholders (such as MIF data) are shown in
text like this. For example, the statement description for is shown as:
<PgfTag tagstring>
You replace tagstring with the tag of a paragraph format. This manual also uses the term FrameMaker, (as in FrameMaker product, FrameMak er document, or
FrameMaker session) to refer to any of the FrameMaker, FrameMaker+SGML, and FrameViewer products.

Overview of MIF statements

When you are learning about MIF statements, you may find it useful to understand how FrameMaker products represent documents.
Introduction

How MIF statements represent documents

FrameMaker products represent document components as objects. Different types of objects represent different components in a FrameMaker document. For example, a paragraph is considered an object; a paragraph format is considered a formatting object. The graphic objects that you create by using the Tools palette are yet another type of object.
Each object has properties that represent its characteristics. For example, a paragraph has properties that represent its left indent, the space above it, and its default font. A rectangle has properties that represent its width, height, and position on the page.
When a FrameMaker product creates a MIF file, it writes an ASCII statement for each object in the document or book. The statement includes substatements for the objects pro perties.
For example , suppose a d ocument (with no text fram e) conta ins a rectan gle that is 2inches wide a nd 1inch high. The rectangle is located 3 inches from the left side of the page and 1.5 inches from the top. MIF repre­sents this rectangle with the following statement:
<Rectangle # Type of graphic object
<ShapeRect 3.0" 1.5" 2.0" 1.0"> # Position and size: left offset,
# top offset, width, and height
>
8ADOBE FRAMEMAKER 6.0
A FrameMaker product also treats each document as an object and stores document preferences as properties of the document. For example, a documents page size and page nu mbering style are document properties.

FrameMaker documents have default objects

A FrameMaker document always has a certain set of default objects, formats, and preferences, even when you create a new document. When you create a MIF file, you usually provide the objects and properties that your document needs. However, if you don’t provide all the objects and properties required in a FrameMaker document, the MIF interpreter fills in a set of default objects and document formats.
The MIF interpreter normally provides the following default objects:
Predefined paragraph formats fo r body text, headers, and table cells
Predefined character formats
A right master page for single-sided documents and left and right master pages for double-sided
documents
A reference page
Predefined table formats
Predefined cross-reference formats
Default pen and fill values and dash patterns for graphics
Default colors
Default document preferences, such as ruler settings
Default condition tags
Introduction
Although you can rely on the MIF interpreter to provide defaults, the exact properties and objects provided may vary depending on your FrameMaker products configuration. The MIF interpreter uses default objects and properties that are specified in setup files and in templates. In UNIX® versions, these templates are and . You can modify these default objects and document formats by creating your own version of or or by modifying your setup files.
For more information about modifying the default templates and setup files, see the online manual Customizing FrameMaker Products for UNIX versions of FrameMaker products. For the Macintosh and Windows® versions, see the chapter on templates in your user manual.

Current state and inheritance

A FrameMaker product has a MIF interpreter that reads and parses MIF files. When you open or import a MIF file, the interpreter reads the MIF statements and creates a FrameMaker document that contains the objects described in the MIF file.
When the interpreter reads a MIF file, it keeps track of the current state of certain objects. If the interpreter reads an object with properties that are not fully specified, it applies the current state to that object. When an object acquires the curr ent state, it inherits the properties stored in that state.
9ADOBE FRAMEMAKER 6.0
For example, if the line width is set to 1 point for a graphic object, the interpreter continues to use a 1-point line width for graphic objects until a new value is specified in the MIF file. Similarly, if the MIF file specifies a format for a paragraph, the interpreter uses the same format until a new format is specified in the file.
The MIF interpreter keeps track of the following document objects and properties:
Units
Condition tag properties
Para graph format properties
Character format properties
Page properties
Graphic frame properties
Text frame properties
Fill pattern
Pen pattern
Line width
Line cap
Line style (dash or solid)
Color
Text line alignment and character format
Because the interpreter also provides default objects for a document, the current state of an object may be determined by a default object. For example, if a document does not provide any paragraph formats, the interpreter applies a set of default paragraph properties to the first paragraph. Subsequent paragraphs use the same properties unless otherwise specified.
Introduction

How a FrameMaker product identifies MIF files

A MIF file must be identified by a or statement at the beginning of the file; otherwise a FrameMaker product simpl y reads the file as a text file. All ot her statements are optional; that is, a valid MIF file c an contain only the statement. Other document objects can be added as needed; a FrameMaker product provides a set of default objects if a MIF file does not supply them.

MIF statement syntax

The statement descriptions in this manual use the following conventions to describe syntax:
tokendatawhere token represents one of the MIF statement names (such as ) listed in the MIF statement descriptions later in this manual, and data represents one or more numbers, a string, a token, or nested statements. Markup statements are always delimited by angle brackets (<>); macro statements are not. For the syntax of macro statements, see “Macro statements” on page 70
A token is an indivisible group of characters that identify a reserved word in a MIF statement. Tokens in MIF are case-sensitive. A token cannot contain white space characters, such as spaces, tabs, or newlines. For example, the following MIF statement is invalid because the token contains white space characters:
.
10ADOBE FRAMEMAKER 6.0
When the MIF interpreter finds white space characters that arent part of the text of the document (as in the example MIF statement, ), it interprets the white space as token delimiters. When parsing the example statement, the MIF interpreter ignores the white space characters between the left angle bracket (<) and the first c haracte r of the t ok en, . A fter readi ng the tok en, the MIF in terpr ete r che cks i ts vali dity. If the t oke n is valid, the interpreter reads and parses the data portion of the statement. If the token is not valid, the interpreter ignores all text up to the corresponding right angle bracket (>), including any nested substate­ments. The interpreter then scans the file for the next left angle bracket that marks the beginning of the next MIF statement.
All statements, as well as all data portions of a statement, are optional. If you do not provide a data portion, the MIF interpreter assigns a default value to the statement.

Statement hierarchy

Some MIF statements can contain other statements. The contained statements are called substatements. In this manual, substatements are usually shown indented within the containing statements as follows:
<Document
<DStartPage 1>
>
The indentation is not required in a MIF file, although it may make the file easier for you to read.
A MIF main statement appears at the top level of a file. A main statement cannot be nested within other statements. Some substatements can only appear within certain main statements.
The statement descriptions in this manual indicate the valid locations for a substatement by including it in all of the valid main statements. Main statements are identified in the statement description; for the correct order of main statements, see MIF file layout on page66
.
Introduction

MIF data items

There are several general types of data items in a MIF statement. This manual uses the following terms and symbols to identify data items.
This term or symbol Means
string
Left quotation mark ( ` ), zero or more standard ASCII characters, and a straight quotation mark (' ). Example: . To include extended ASCII characters in a string, you must use a backslash sequence (see “Character set in strings” on page 13
).
11ADOBE FRAMEMAKER 6.0
tagstring
pathname boolean integer ID
dimension
degrees
percentage
metric
WH XY
LTRB
A string that names a format tag, such as a paragraph format tag. A tagstring value must be unique; case is significant. A statement that refers to a tagstring must exactly match the tag- string value. A tagstring value can include any character from the FrameMaker character set.
A string specifying a pathname (see “Device-independent pathnames ” on page 13).
A value of either or . Case is significant.
Integer whose range depends on the associated statement name.
Integer tha t sp e ci f ie s a un iqu e ID . An ID ca n b e an y po s it i ve in te g er be t w een 1 a n d 655 35 , inc l u­sive. A statement that refers to an ID must exactly match the ID.
Decimal number signifying a dimension. You can specify the units, such as , , and . If no units are specified, the default unit is used (see “Units statement” on page 68
A decimal number signifying an angle value in degrees. You cannot specify units; any number is interpreted as a degree value.
A decimal number signifying a percentage value. You cannot specify units; any number is inter­preted as a percentage value.
A dimension specified in units that represent points, where one point is 1/72 inch (see “Math val- ues” on page 12). Only used in statements.
Pair of dimensions representing width and height. You can specify the units.
Coordinates of a point. Coordinates originate at the upper-left corner of the page or graphic frame. You can specify the units.
Coordinates representing left, top, right, and bottom indents. You can specify the units.
).
LTWH
XYWH
keyword
<token>
Coordinates representing the left and top indents plus the dimensions representing the width and height of an object. You can specify the units.
Coordinates of a point on the physical screen represented by X and Y plus dimensions describing the width and height. Used only by the and statements within the statement and the statement within the statement. The values are in pixels; you cannot specify the units.
A token value. The allowed token values are listed for each statement; you can provide only one value.
Ellipsis points in a statement indicate required substatements or arguments. The entire expanded statement occurs at this point.
Introduction

Unit values

You can specify the unit of measurement for most dimension data items. The following table lists the units of measurement that a FrameMaker product supports and their notation in MIF.Dimension data types can
Measurement unit Notation in MIF Relationship to other units
point pt or point 1/72 inch inch " or in 72 points millimeter mm or millimeter 1 inch is 25.4 mm centimeter cm or centimeter 1 inch is 2.54 cm pica pc or pica 12 points didot dd or didot 0.01483 inches cicero cc or cicero 12 didots
mix different units of measurement. For example, the statement LTRB can be written as either of the following:
12ADOBE FRAMEMAKER 6.0
<CellMargins6pt18pt6pt24pt> <CellMargins 6 pt .25" .5 pica 2 pica>
Math values
The statement uses metric values in formatting codes. A metric unit represents one point (1/72 inch). The metric type is a 32-bit fixed-point number. The 16 most significant bits of a metric value represent the digits before the decimal; the 16 least significant bits represent the digits after the decimal. Therefore, 1 point is expressed as hexadecimal or decimal . The following table shows how to convert metric values into equivalent measurement units.
To get this unit Divide the metric value by this number
point 65536 inch 4718592 millimeter 185771 centimeter 1857713 pica 786432 didot 6997 cicero 839724
Introduction

Character set in strings

MIF string data uses the FrameMaker character set (see the Quick Reference for your FrameMaker product). MIF strings must begin with a left quotation mark (ASCII character code ) and end with a straight quotation mark (ASCII character code ). Within a string, you can include any character in the FrameMaker character set. However, because a MIF file can contain only standard ASCII characters and because of MIF parsing requirements, you must represent certain characters with backslash (\) sequences.
Character Representation
Tab \ t >\>
\q `\Q \\\ nonstandard ASCII \xnn
13ADOBE FRAMEMAKER 6.0
All FrameMaker characters with values above the standard ASCII range (greater than ) are represented in a string by using nn notation, wh ere nn represents the hexadecimal code for the character. The hexadecimal digits must be followed by a space.
The following example shows a FrameMaker document line and its representation in a MIF string.
In a FrameMaker document In MIF
Some `symbols': > \Ø¿! `Some \Qsymbols\q: \> \\\xaf \xc0 !'
You can also use the statement to include certain predefined special characters in a statement (see “Char statement on page136).

Device-independent pathnames

Several MIF statements require pathnames as values. You should supply a device-independent pathname so that files can easily be transported across different system types. Because of MIF parsing requirements, you must use the following syntax to supply a pathname:
`<code\>name<code\>name<code\>name…'
where name is the name of a component in the files path and code identifies the role of the component in the path. The following table lists codes and thei r meanings.
Code Meaning
r Root of UNIX file tree (UNIX only) v Volume or drive (Macintosh and Windows) h Host (Apollo only) c Component
Introduction
Code Meaning
u Up one level in the file tree
When you specify a device-independent pathname in a MIF string, you must precede any right angle brackets (>) with backslashes (\), as shown in the syntax above.
Absolute pathnames
An absolu te pa thna me shows the location of a file beginning with the root directory, volume, or drive. The following table specifies device-independent, absolute pathnames for the different versions of FrameMaker products.Relative pathnames
In this version The pathname appears as this MIF string
UNIX `<r\><c\>MyDirectory<c\>MySubdirectory<c\>Filename' Macintosh `<v\>MyVolume<c\>MyFolder<c\>MySubfolder<c\>Filename' Windows `<v\>c:<c\>mydir<c\>subdir<c\>filename'
14ADOBE FRAMEMAKER 6.0
A relative pathname shows the location of a file relative to the current directory. In all FrameMaker product versions, the device-independent, relative pathname for the same file is:
`<c\>Filename'
Introduction
15ADOBE FRAMEMAKER 6.0

Using MIF Statements

MIF statements can completely describe any FrameMaker document, no matter how complex. As a result, you often need many MIF statements to describe a document. T o learn how to use MIF statements, it helps to begin with some simple examples.
This chapter introduces you to MIF, beginning with a simple MIF example file with only a few lines of text. Additional examples sho w how to add common document objects, such as paragraph formats, a table, and a custom page layout, to this simple MIF file.
The examples in this chapter are also provided in online sample files. You can open these examples in a FrameMaker product and experiment with them by adding additional MIF statements. Look for the sample files in the following location:
In this version Look here
16
UNIX $FMHOME/fminit/language/Samples/MIF, where language is the language in use, such as
Macintosh The MIF folder in the Samples folder Windows The MIF directory under the samples directory
usenglish

Working with MIF files

A MIF file is an alternate representation of a FrameMaker document in ASCII format. MIF files are usually generated by a FrameMaker product or by an application that writes out MIF statements. You can, however, create MIF files by using a text editor or by using a FrameMaker product as a text editor. This section provides some general information about working with MIF files regardless of the method you use to create them.

Opening and saving MIF files

When you save a FrameMaker document, you usually save it in Normal format, FrameMakers binary format for document files. To sa ve a document as a MIF file, choose Save As from the File menu. In the Save Document dialog box, choose Inter change (MIF) from the Format pop-up men u. You should give the saved file the suffix .mif to distinguish it from a file saved in binary format.
When you open or import a MIF file, a FrameMaker product reads th e file directly, translati ng it into a FrameMaker document or book. When you sa ve the document in N ormal format, a FrameMaker pr oduct creates a binary document file. T o prev ent overwriting the original MIF file, remove the .mif file suffix and replace it with a different suffix (or no suffix).
Using MIF Statements
If you use a FrameMaker product to edit a MIF file, you must prevent it from interpreting MIF statements when you open the file by holding down a modifier key and clicking Open in the Open dialog box.
In this version Use this modifier key
UNIX Shift Macintosh Option Windows Control or Shift NeXT Alt
Save the edited MIF file as a text file by using the Save As command and choosing Text Only from the Format pop-up menu. Give the saved file the suffix .mif. When you save a document as Text Only, a FrameMaker product asks you where to place carriage returns. For a MIF file, choose the Only between Paragraphs opti on .
In UNIX versions, a FrameMaker product saves a document in text format in the ISO Latin-1 character encoding. Y ou can change the character encoding to ASCII by changing the value of an X resource. See the description of character encoding in the online manual Customizing FrameMaker Products. In Macintosh and Windows versions, press Esc F t c to toggle between FrameMakers character encoding and ANSI for Windows or ASCII for Macintosh.
17ADOBE FRAMEMAKER 6.0

Importing MIF files

Y ou ca n use the File menu ’s Import>File command to import MIF files into an existing document, but you must make sure that the imported statements are valid at the location where you are importing them. A MIF file can describe both text and graphics; make sure that you ha ve selected either a place in the text flow (if you are importing text or graphics) or an anchored frame (if you are importing graphics).
For example, to import a MIF file that describes a graphic, first create an anchored frame in a document, select the frame, and then import the MIF file (see Bar chart example on page 235).
When you import or include MIF files, make sure that object IDs are unique in the final document and that references to object IDs are correct (see Generic object statements on page 111).

Editing MIF files

You normally use a text editor to edit a MIF file. If you use a FrameMaker product to enter text into a MIF file, be sure to open the MIF file as a text file and turn off Smart Quotes. If you leave Smart Quotes on, you must use a key sequence to type the quotation marks that enclose a MIF string (`'). To enter a left quotation mark, type Control-`. To enter a straight quotation mark, type Control-'.
Although MIF statements are usually generated by a program, while you learn MIF or test and debug an application that generates MIF, you may need to manually generate MIF statements. In either case, you can minimize the number of MIF statements that your application needs to generate or that you need to type in.
Using MIF Statements
The following suggestions may be helpful when you are working with MIF statements:
Edit a MIF file generated by a FrameMaker product.
You can edit a MIF file generated by a FrameMaker product or copy a group of statements from a MIF file into your file and then edit the statements. An easy way to use a FrameMaker product to generate a MIF file is to create an empty document by using the New command and then saving it as a MIF file.
Test one object at a time.
While testing an object in a document or learning about the MIF statements that describe an object, work with just that object. For example, if you work with a document that contains both tables an d anchored frames, start by creating the MIF statements that describe tables. Then add the statements that descri be anchor ed frames.
Use the default properties provided by a FrameMaker product.
If you are not concerned with testing certain document components, let a FrameMaker product provide a set of default document objects and formats.

MIF file layout

A FrameMaker product writes the objects in a MIF document file in the following order:
18ADOBE FRAMEMAKER 6.0
This section Contains these objects
File ID MIF file identification line (MIFFile statement) Units Default units (Units statement) Catalogs Color
Formats Variable
Objects Document
Condition Paragraph Format Element Font or Character Format Ruling Table Format Views
Cross-reference
Dictionary Anchored frames Tables Pages Text flows
A FrameMaker product provides all of these objects, even if the object is empty. To avoid unpredictable results in a document, you must follow this order when you create a MIF file.

Creating a simple MIF file for FrameMaker

The rest of this chapter explains how to create some simple MIF files for FrameMaker and FrameViewer by hand. These instructions do not apply to FrameMaker+SGML, which requires that you create elements first.
Using MIF Statements
The most accurate source of information about MIF files is a MIF file generated by a FrameMaker product. MIF files generated by a FrameMaker product can be very lengthy because a FrameMaker product repeats information and provides default objects an d formats for all documents. You may find it difficult to determine the minimum number of statements that are necessary to define your document by looking at a FrameMaker-generated MIF file.
To better understand how a FrameMaker product reads MIF files, study the following example. This MIF file uses only four statements to describe a document that contains one line of text:
<MIFFile 6.00> # The only required statement <Para # Begin a paragraph
<ParaLine # Begin a line within the paragraph
<String `Hello World'> # The actual text of this document
>#end of Paraline # End of ParaLine statement
>#end of Para # End of Para statement
The MIFFile statement is required in each MIF file. It identifies the FrameMaker product version and must appear on the first line of the file. All other statements are optional; that is, a FrameMaker product provides a set of default objects if you specify none.
19ADOBE FRAMEMAKER 6.0
Comments in a MIF file are preceded by a number sign (#). By convention, the substatements in a MIF statement are indented to show their nesting level and to make the file easier to read. The MIF interpreter ignores spaces at the beginning of a line.
This example is in the sample file hello.mif. To see how a FrameMaker product provides defaults for a document, open this file in a FrameMaker product. Even though the MIF file does not specify any formatting, a FrameMaker product provide s a default Paragraph Catalog and Character Catalog. In addition, it provides a right master page, as well as many other default properties.
Save this document as a MIF file and open the FrameMaker-generated MIF file in a text editor or in a FrameMaker product as a text file. (For information on how to save and open MIF files, see Opening and saving MIF files on page 16.)
Youll see that the MIF interpreter has taken the original 6-line file and generated over 1,000 lines of MIF statements that describe all the default objects and their properties. T o see the actual text of the document, go to the end of the file.
This example demonstrates an important point about MI F files. Your MIF file can be very sparse; the MIF interpreter supplies missing information. Most documents are not this simple, however, and require some formatting. The following sections describe how to add additional document components, such as paragraph and charac ter formats, a table, and custo m page layouts, to this minimal MIF file.

Creating and applying paragraph formats

In a FrameMaker document, paragraphs have formatting properties that specify the appearance of the paragraph’s text. A paragraph format includes the font family and size, indents, tab stops, the space between line s in a paragrap h, a nd th e sp ace befo re and af te r a par agraph. In a F rameM ak e r do cume nt, t he end of a paragraph is d enoted by a single carriage r eturn. You control the amount of spac e abov e and belo w the paragraph by modifying the paragraph’s format, not by adding extra carriage returns.
Using MIF Statements
In a FrameMaker document, you store paragraph formats in a Paragraph Catalog and assign a tag (name) to the format. You can then apply the same format to many paragraphs by assigning the format tag to the paragraphs. You can also format a paragraph individually, without storing the format in the Paragraph Catalog. Or, you can assign a format from the Paragraph Catalog and then override some of the properties within a particular paragraph. Formats that are not stored in the Paragraph Catalog are called local formats.

Creating a paragraph

In a MIF file, paragraphs are defined by a Para statement. A Para statement contains one or more ParaLine statements that contain the lines in a paragraph; the actual text of the line is enclosed in one or more String statements:
<Para # Begin a paragraph
<ParaLine # Begin a line within the paragraph
<String `Hello World'> # The actual text of this document
> # End of ParaLine statement
> # End of Para statement
The Para, ParaLine, and String statements are the only required statements to import text. You could use this example to import a simple document into a FrameMaker p roduct by placing each paragraph in a Para statement. Break the paragraph text into a series of String statements contained in one ParaLine statement. It doesnt matter how you break up text lines within a Para statement; the MIF interpreter automatically wraps lines when it reads the MIF file.
20ADOBE FRAMEMAKER 6.0
Some characters must be represented by backslash sequences in a MIF string. For more information, see Character set in strings on page13.

Creating a paragraph format

Within a FrameMaker document, you define a paragraph format by using the Paragraph Designer to specify the paragraphs pr operties. In a MIF file, you define a paragraph format by using the Pgf statement.
The Pgf statement co ntains a gr oup of substat ements th at describe all of a p aragraph ’s properties. It has the following syntax:
<Pgf
<property value> <property value> ...
A Pgf statement is quite long, so learning how to relate its substatements to the paragraph’s properties may take some practice. Usually a MIF statement name is similar to the name of the setting within a dialog box. The following examples show the property dialog boxes from the Paragraph Designer with the related Pgf substatements.
Using MIF Statements
Suppose you have created a paragraph format for a numbered list item with Basic properties defined as follows in the Paragraph Designer.
21ADOBE FRAMEMAKER 6.0
The following table shows the corresponding MIF statements:
In MIF file In Paragraph Designer
<PgfTag `Numbered'> Paragraph Tag <PgfFIndent 0.0"> First Indent <PgfLIndent 0.25"> Left Indent <PgfRIndent 0.0"> Right Indent <PgfAlignment Left > Alignment <PgfSpBefore 0.0 pt> Space Above <PgfSpAfter 0.0 pt> Space Below <PgfLeading 2.0 pt> Line Spacing (leading is added to font size) <PgfLineSpacing Fixed> Line Spacing (fixed) <PgfNumTabs 1> Number of tab stops <TabStop Begin definition of tab <TSX 0.25"> Tab position <TSType Left > Tab type <TSLeaderStr `'> Tab leader (none) > # end of TabStop
In MIF file In Paragraph Designer
<PgfUseNextTag No > Turn off Next Tag feature <PgfNextTag `'> Next Tag name (none)
The Default Font properties are defined as follows in the Paragraph Designer.
Using MIF Statements
22ADOBE FRAMEMAKER 6.0
The following table shows the corresponding MIF statements:
In MIF file In Paragraph Designer
<PgfFont <FFamily `Times'> Family <FSize 12.0 pt> Size <FEncoding> <FAngle `Regular'> Angle <FWeight `Regular'> Weight <FLanguage> Language <FVar `Regular'> Variation <FColor `Black'> Color <FDW 0.0 pt> Spread <FStretch 100%> Stretch <FUnderlining NoUnderlining > Underline
In MIF file In Paragraph Designer
<FOverline No > Overline <FStrike No > Strikethrough <FChangeBar No > Change Bar <FPosition FNormal > Superscript/Subsc rip t <FCase FAsTyped > Capitalization <FPairKern Yes > Pair Kern <FT sume No> Tsume (Asian systems only) > # end of PgfFont
The Pagination properties are defined as follows in the Paragraph Designer.
Using MIF Statements
23ADOBE FRAMEMAKER 6.0
The following table shows the corresponding MIF statements:
In MIF file In Paragraph Designer
<PgfPlacement Anywhere > Start <PgfWithNext No > Keep With Next <PgfWithPrev No > Keep With Previous <PgfBlockSize 1> Widow/Orphan Lines <PgfPlacementStyle Normal > Format (paragraph placement) <PgfRunInDefaultPunct `. '> Run-in Head Default Punctuation (a period followed by an em space)
The Numbering properties are defined as follows in the Paragraph Designer.
Using MIF Statements
24ADOBE FRAMEMAKER 6.0
The following table shows the corresponding MIF statements:
In MIF file In Paragraph Designer
<PgfAutoNum Yes > Turn on Autonumber <PgfNumFormat `<n+\>.\\t' > Autonumber Format (a number followed by a period and a tab) <PgfNumberFont `' > Character Format (Default ¶ Format) <PgfNumAtEnd No > Position (Start of Paragraph)
The Advanced properties are defined as follows in the Paragraph Designer.
Using MIF Statements
25ADOBE FRAMEMAKER 6.0
The following table shows the corresponding MIF statements:
In MIF file In Paragraph Designer
<PgfHyphenate Yes > Automatic Hyphenation (on) <HyphenMaxLines 2> Max. # Adjacent <HyphenMinWord 5> Shortest Word <HyphenMinPrefix 3> Shortest Prefix <HyphenMinSuffix 3> Shortest Suffix <PgfMinWordSpace 90> Minimum Word Spacing <PgfOptWordSpace 100> Optimum Word Spacing <PgfMaxWordSpace 110> Maximum Word Spacing <PgfLetterSpace Yes > Allow Automatic Letter Spacing <PgfTopSeparator `'> Frame Above <PgfBotSeparator `'> Frame Below
The Table Cell properties are defined as follows in the Paragraph Designer.
Using MIF Statements
26ADOBE FRAMEMAKER 6.0
The following table shows the corresponding MIF statements:
In MIF file In Paragraph Designer
<PgfCellAlignment Top > Cell Vertical Alignment <PgfCellMargins 0.0 pt 0.0 pt
0.0 pt 0.0 pt> <PgfCellTMargi nFi xed No > Top <PgfCellBMarginFixed No > Bottom <PgfCellLMarginFixed No > Left <PgfCellRMarginFixed No > Right
Cell Margins

Adding a Paragraph Catalog

In a MIF file, you define a Paragraph Catalog by using a PgfCatalog statement. The Paragraph Catalog contains one or more paragraph formats, which are defined by Pgf statements. A PgfCatalog statement looks like this:
<PgfCatalog
<Pgf
> # A paragraph format description
<Pgf
> # More paragraph formats
> # end of PgfCatalog
The Pgf statement describes a complete paragraph format. For example, the sample file pgfcat.mif stores the paragraph format 1Heading in the Paragraph Catalog:
Using MIF Statements
<MIFFile 6.00> # Hand generated <PgfCatalog
<Pgf
<PgfTag `1Heading'> <PgfUseNextTag Yes > <PgfNextTag `Body'> <PgfAlignment Left > <PgfFIndent 0.0"> <PgfLIndent 0.0"> <PgfRIndent 0.0"> ...
>#endofPgf
> # end of PgfCatalog
If you open pgfcat.mif in a FrameMaker product, youll see that t he Paragrap h Catalog contains a single paragraph format called 1Heading. If you supply a Paragraph Catalog, the paragraph formats in your catalog replace those in the default catalog; they do not supplement the default formats.
If you do not supply a Paragraph Catalog in a MIF file, the MIF interpreter provides a default Paragraph Catalog with predefined paragraph formats.
27ADOBE FRAMEMAKER 6.0
If a Pgf statement provides only the name of a paragraph format, the MIF interpreter supplies default values for the rest of the paragraph properties when it reads in the MIF file.

Applying a paragraph format

To apply a format from the Paragraph Catalog to a paragraph, use the PgfTag statement to include the format tag na me within the Para statement. For example, to apply the previously defined format 1Heading to a paragraph, use the following statements:
<Para
<PgfTag `1Heading'> <ParaLine
<String `This line has the format called 1Heading.'>
> # end of ParaLine
>#endofPara
To apply a format from the Paragraph Catalog and then locally override some properties, use a partial Pgf statement within the Para statement. The following MIF example applies the paragraph format 1Heading, then changes the alignment:
Using MIF Statements
<Para
<PgfTag `1Heading'> <Pgf
<PgfAlignment Center> >#endofPgf <ParaLine
<String `This line is centered.'> > # end of ParaLine
>#endofPara
To locally define a paragraph format, include a complete Pgf statement within the Para statement:
<Para
<Pgf
<PgfTag `2Heading'>
<PgfUseNextTag Yes >
<PgfNextTag `Body'>
<PgfAlignment Left >
<PgfFIndent 0.0">
<PgfLIndent 0.0">
... >#endofPgf <ParaLine
<String `A locally formatted heading'> > # end of ParaLine
>#endofPara
28ADOBE FRAMEMAKER 6.0
For a complete description of Pgf property statements, see page 73.

How paragraphs inherit properties

Paragraphs can inherit properties from other paragraphs in a MIF file. If a Pgf statement does not provide values for each paragraph property, it acquires any property values explicitly defined in a previous Pgf statement. Because the MIF interpreter sequentially reads MIF files, it uses the most recently defined Pgf statement that occurs before the current statement in the file.
For example, the following MIF cod e applies the default format named Body to the first paragraph in a document and locally overrides the paragraph font:
Using MIF Statements
<Para <Pgf <PgfTag `Body'>
<PgfFont
<FWeight `Bold'>
> # end of PgfFont
> # end of Pgf
<ParaLine
<String `First paragraph in document.'>
> # end of ParaLine
> # end of Para <Para
<ParaLine
<String `Second paragraph in document.'>
> # end of ParaLine
> # end of Para
The previous example is in the sample file pgffmt.mif. If you open this file in a FrameMaker product, youll find that the second paragraph also has the new font property.
29ADOBE FRAMEMAKER 6.0
A paragraph property remains in effect until the property value is changed by a subsequent MIF statement. T o c hange a paragrap h prope rty to another s tate, su pply a Pgf statement containing the paragraph property statement set to the new state.
Thus, in the previous example, you could change the font from Bold to Regular in a Pgf statement in the second Para statement:
<Para
<Pgf
<PgfFont
<FWeight `Regular'>
> # end of PgfFont >#endofPgf <ParaLine
<String `Second paragraph in document.'> > # end of ParaLine
>#endofPara
To summarize, p aragraphs inherit fo rmats as follows:
Formats in the Paragraph Catalog inherit properties from the formats above them.
Locally defined paragraph formats inherit properties from previously specified formats.
T ext lines in anchored frames inherit font properties from previously specified formats, including the last
format in the Paragraph Catalog and previous text li nes.
Using MIF Statements

Tips

The following hints may help you minimize the MIF statements for paragraph formats:
If possible, use the formats in the default Paragraph Catalog (dont supply a PgfCatalog statement). If
you know the names of the default paragraph formats, you can tag paragraphs with the PgfTag statement.
If you know that a document will use a particular template when it is imported into a FrameMaker
document, you can just tag the paragraphs in the text flow. Don’t create a new Paragraph Catalog in MIF; it’s easier to create catalogs in FrameMaker document templates.
If you need to provide a full Paragraph Catalog in a MIF file, you can still use a FrameMaker product to
ease the task of creating a catalog. Create a template in a FrameMaker product, save the template as a MIF file, and include the Paragraph Catalog in your document. For instructions, see Including template files on page 55.

Creating and applying character formats

You can define character formats locally or store them in the Character Catalog and apply the formats to text selectio ns. Cr eating and applyi ng charact er form ats is v ery similar t o cre ating and ap plying p aragraph formats as described in the previous section. Because the two methods are similar, this section just summa­rizes how to create and apply character formats.
30ADOBE FRAMEMAKER 6.0
In a MIF file, the Character Catalog is contained in a FontCatalog statement. The FontCatalog statement contains named character formats in a list of Font sta tements. A FontCatalog statement looks like this:
<FontCatalog
<Font...> # Describes a character format <Font...> # Describes a character format
> # end of FontCatalog
A Font statement specifies the properties of a character format; these are the same properties specified in the Character Designer. The Font statement is just like the PgfFont statement that you use to define the default font in a paragraph format. See PgfFont and Font statements on page78 for a complete description of a Font statement.
To apply a predefin ed character format to text, use the FTag statement:
Loading...
+ 293 hidden pages