mifXfig - MIF to XFig and XFig to MIF Converter Page
What is MIF
MIF is FrameMaker((R))
Interchange Format. You create it from any FrameMaker document by pressing
Save As and choosing Format:Interchange(MIF). There can be
many pictures in your document, created by FrameMaker.
What is XFig
XFig is a very popular graphical editor
for various platforms supporting XWindows. It is usually available as xfig
on your computer.
You can save files in XFig format (.fig -
files); you can also export PostScript, GIF, various LaTeX picture formats
and some others.
This editor and this format is rather popular among LaTeX
users.
How to convert from MIF to
XFig
You convert one FrameMaker document (.mif)
to many .fig files.
Command mif2xfig xxx.mif
analyses the file xxx.mif,
finds all pictures there and creates several files with names
xxx.mif.*.fig (here * is replaced by various numbers
which make no much sense for a typical user ).
Note: the converter works with FrameMaker 4.0 format.
Advanced details and options:
The resulting saved files have such names:
-
xxx.mif.frame-number.fig - for
FrameMaker anchored frames; the number of the frame is assigned internally
in FrameMaker and makes no much sense for a typical user. These numbers
do not correspond to order of pictures in the document.
-
xxx.mif.ppage-number.fig - for
all graphics outside anchored frames on specific page
Flags:
-i number translates
only the anchored frame with this number
-o file
specifies output file name
-p number translates
only the graphics non-belonging to the anchored frame on the page with
this number
Some limitations:
-
Several fonts in one string: XFig allows only one font per string.
Therefore resulting strings are written in one font even if in FrameMaker
several fonts were used: Example
-? Example.
-
Font catalog not used: Translator can miss Bold or Italic if you
use in graphic some font name from the Font Catalog.
-
Arrows: Some difference in head geometry may occur.
-
Rotated figures: Translator does not use rotation except in TextLine
and Ellipse, because angle-parameter only exists there in Xfig.
-
Very special characters: European characters other than a-z,A-Z,
Åå, Ää, Öö, Áá, Àà, Ññ, Éé, Èè, Óó, Òò, Üü and Ï ï are not translated.
The Greek characters however, are translated.
-
Other FrameMaker versions. We assume that input is produced by FrameMaker
4.0. You have input from some other source (some converter or different
version of FrameMaker), you should first load it to FrameMaker 4.0 and
save it !
-
Other XFIG versions and products. The result should be read by XFIG
Version 3.1 (Protocol 3.1). If you are going to use some other tool, load
the figure first in XFIG, save it and use then. Particularly, do not pass
the result directly to transfig or fig2dev (sometimes
this may produce wrong result).
How to convert from XFig
to MIF
You convert one .fig picture to one FrameMaker
document (.mif- file) with this picture in anchored frame
on the first page.
Command xfig2mif xxx.fig analyses the
figure and creates file with name xxx.fig.mif . This file
can be directly read by the FrameMaker. You can use cut-and-paste in order
to add the frame into your document
Advanced details and options:
Flags:
-i number sets
this number as identifier for the the anchored frame ( 1 by default )
-o file
specifies output file name
-s
the translator creates only one Frame statement. It
cannot be read by FrameMaker, but can be glued with other MIF code in order
to produce a document.
Some limitations:
-
LaTeX fonts cannot be used (we will attempt to fix it in the next
release)
-
Imported graphics (e.g. GIF images) is ignored
-
User-defined colors are reduced. There are 32 pre-defined colors
in XFig. A user-defined color is automatically replaced by some predefined
one.
-
Arrows: Some difference in head geometry may occur.
-
Very special characters: European characters other than a-z,A-Z,
Åå, Ää, Öö, Áá, Àà, Ññ, Éé, Èè, Óó, Òò, Üü and Ïï
are not translated.
-
The input should be produced by XFIG version 3.1 (protocol 3.1).
Files produced by Version 3.2 cannot be used.
-
The output should be read by FrameMaker 4.0. If you are going to
use some other converters or other FrameMaker versions, you should load
the output to FrameMaker 4.0, save it and then use it further.
Download (or use directly)
The source code (in C) is distributed free for non-commercial
use. Please contact Vadim Engelson, vaden@ida.liu.se
Download at http://www.ida.liu.se/~vaden/teaching/m2f/mifXfig.1.0.tar.gz
(includes source code and this page).
At IDA(Linköping University) the software is (for this
moment) installed at
~pelab/pub/bin/xfig2mif and
~pelab/pub/bin/mif2xfig,
/usr/local/bin/xfig2mif and
/usr/local/bin/mif2xfig
FAQ Frequently Asked Question(s)
? 1. What about XFIG V3.2 ?
Answer below.
Version XFig 3.2
There are some differences between 3.1 and 3.2 , mainly in presentation
of splines. We currently HAVE NO RESOURCES (nor people, nor money) to
make the tools working with XFIG 3.2. If somewone has time, please,
modify the code and let me know. Some useful hints about spline processing
are given in the thesis. Probably this is a programming project good for
an average student for 1-2 weeks.
Documentation
Most of the end user information is contained in this
WWW-page, currently located at http://www.ida.liu.se/~vaden/teaching/m2f/index.html
This tool is master thesis of Mikael Lundquist. Complete text of thesis
with examples and technical details is available: PostScript
(120K, 52 pages with text + 65 pages with program code).
Links
FrameMaker
FrameMaker (R) is a registered trademark of Frame Technology Corporation
4.0.
XFIG
PSTOEDIT
It is another recommended tool for document translation. It translates
PostScript into other vector formats, including MIF, PDF, XFIG and many
others. However it does not preserve grouping of graphical objects and
curves it produces are difficult to change.
-
Description
and FTP to
download
-
At IDA installed as ~pelab/pub/bin/pstoedit
Ansgar Radermacher
ansgar@Informatik.UniBW-Muenchen.de
have made some enhances to mif2xfig, particularly the support for
mixed latex/xfig output.
They primarily use mif2xfig to convert the output of our research tool
PROGRES
towards LaTeX. They only have tested the results using the MIF output of
PROGRES. It might not work with other MIF sources.
Is it possible to distribute the modified version of mif2xfig together
with PROGRES.
The modified version (1.1 of Feb 3, 1999) is here.
Author and contact information
Author of the tool is Mikael Lundqvist, Linköping, Sweden. Tool is produced
at PELAB, IDA, Linköping University (c) 1996
This page is created by Vadim Engelson,
. Please contact me for additional information, bug reports, and bug fixes.
Last big change 18 Nov 1996. Addition of PROGRES 8 Feb 1999.