
ADOBE FRAMEMAKER 10
MIF Reference
49
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 FrameMaker to automatically start a script that runs a filter based on the filename
suffix. The filter can convert a file to a MIF file. FrameMaker then interprets the MIF file, storing the results in a
FrameMaker document.
For more information about installing your filter, see the online manual
Customizing
FrameMaker
.
Minimizing MIF statements
The following tips may help you minimize the number of MIF statements that your filter needs to generate:
•
If you are not concerned about controlling the format of a document, use the default formats that FrameMaker
provides for new documents. The user can always change formats as needed within the FrameMaker document.
•
If you are filtering a document from another application into FrameMaker and then back to the application, you
may want to import the filter’s MIF file into a FrameMaker document, save the document as a MIF file, and then
convert the file back to the original format from the MIF file generated by FrameMaker. This technique takes
advantage of FrameMaker’s syntactically complete MIF statements, but allows your filter to write a shorter MIF file.
•
If your filter needs to generate fully-formatted MIF files, you can minimize the number of formatting statements
by creating a template in FrameMaker, saving the template as a MIF file, and then including the MIF template file in
your filter’s generated document. You must edit the saved MIF template (see
“Including template files” on page 44
).
An advantage of this technique is that you can use the same template for more than one document.
•
Define macros to ease the process of generating statements. For an example of using macros, see
“Text example”
on page 220
.
Database publishing
You can use MIF files to import information from an external application, such as a database, into a FrameMaker
document. This type of information transfer is often called
database publishing
. For example, you can write a C
program or a database script to retrieve information from a database and store that information as a MIF file. A user
can then open or import the MIF file to get a fully formatted FrameMaker document that contains up-to-date infor-
mation from the database.
There are four key elements to a typical database publishing solution:
•
The database provides a system to enter, manipulate, select, and sort data. You can use any database that can
create text-based output files.
•
MIF provides the data interchange format between the database and FrameMaker. MIF can completely describe
a document in ASCII format, including information such as text and graphics, page layout, and indexes and cross-
references.
•
FrameMaker provides the text formatting. FrameMaker reads MIF files and dynamically manages line breaks,
page breaks, headers and footers, and graphics. The user can view, print, save, or even navigate through an online
document using hypertext commands.
Содержание FRAMEMAKER 10
Страница 1: ...MIF Reference ADOBE FRAMEMAKER 10...