Adobe framemaker 6.0 User Manual

Page of 323
61
ADOBE FRAMEMAKER 6.0
 Using MIF Statements
Modifying documents
You can use MIF to perform custom document processing. For example, you can create a program or write 
a series of text editor macros to search for and change paragraph tags in a MIF file. You can also edit a MIF 
book file to easily add or change document names in 
a book.
For an example of using MIF to easily update the values in a table, see “Updating several values in a table” 
on page 244
.
Writing filters
MIF allows you to write filters to convert data from other formats to FrameMaker format and to convert a 
MIF file to another document format. While FrameMaker products will change in future versions, MIF will 
always remain compatible with earlier versions, so your filters can continue to write MIF files.
Import filters
MIF statements can completely describe a FrameMaker document or book file. Because documents created 
with most word processors and text editors have fewer features than a FrameMaker document, your import 
filters normally use only a subset of MIF statements.
To write an import filter, first determine which MIF statements describe the format of the input file. Then 
write a program to translate the file from its original file format to MIF. If the imported document doesn’t 
use sophisticated formatting and layout features, don’t include the corresponding MIF statements in your 
filter.
For example, if the file was created by a word processor, your filter should convert document text to a single 
TextFlow statement. Ignore line and page breaks (except forced breaks) in your source document, because 
the text will be repaginated by the MIF interpreter. If the document uses style sheets, convert paragraph 
styles to paragraph formats in a PgfCatalog statement, and convert table styles to table formats in a 
TblCatalog statement.
Output filters
You can write output filters that convert a MIF file to any format you want. While you should be familiar 
with all MIF statements to determine which ones you need to translate a FrameMaker document, your 
output filter doesn’t need to convert all the possible MIF statements. 
In most cases, a MIF description of a FrameMaker document contains more information than you need. 
Because MIF appears as a series of nested statements, your output filter must be able to scan a MIF file for 
the information it needs and skip over statements that it will not use.
Installing a filter
In UNIX versions, you can set up a FrameMaker product to automatically start a script that runs a filter 
based on the filename suffix. The filter can convert a file to a MIF file. The FrameMaker product then inter-
prets the MIF file, storing the results in a FrameMaker document. For more information about installing 
your filter, see the online manual Customizing FrameMaker Products.