Below is some information about the filter and a list of changes from the
last version.
Enjoy!
Jon.
----------------------------
Jon Stephenson von Tetzchner
Norwegian Telecom Research
jons@hal.nta.no
----------------------------
-------------------------------------------------------------------------------
Frame 2 Html filter
====================================================
This filter has been made as part of my work at Norwegian Telecom Research.
All rights to the filter belong to Norwegian Telecom Research.
The filter can be modified as long as the top lines of each source file
indicating the original source of the filter is kept. We would also
appriciate being sent information about bugs, bug fixes, etc.
The code can not be included in a commercial product.
The current version of the filter:
o Handles frame files and books.
o Is customable, through a tags file mapping frame tags to
logical tags used by the filter.
o All frame X-refs become html links.
o An index is automatically generated based on chapter
headings in the frame documents.
o The file structure of the frame document is kept in the
html document. Single frame files become single
html files. Frame books become multiple html files,
one html file for each frame file. FrameMaker generated
files are removed.
o Graphics and maths are separated to files, which are then
translated to postscript and ultimately gif.
o Tables are handled through the <pre> html tag.
o Italics and bold parts of paragraphs are handled.
Problems and bugs:
o Characters in frame not in html, including Greek character.
o Documents that are divided into sections using the FrameMaker
'frame'.
o FrameMaker documents which do not use tags and operate on
text directly.
o Very large pictures are not handled well (bigger than an A4).
o Only anchored frames are handled well. Other graphics may be lost.
This program was made for internal use only. I will try to make it portable,
but it is not unlikely that a few paths have to be changed.
Acknowledgement:
I would like to thank Geir Ivarsoey of Norwegian Telecom Research,
Duncan Fraser and Randy Roesler of MacDonald Detwiller, Daniel K.Schneider of
TECFA (Educational Technologies and Learning),
Jan van der Steen of Computer Lab, Amsterdam,
Stephen Martin of LSI Logic Corporation of Canada, and
Rob Kooper and Bob Jackson
for their assistance in improving this program.
Availability:
ftp bang.nta.no:pub/fm2html.v.0.n.m.tar.Z.
Disclaimer:
Use this program at your own risk.
----------------------------------------------------------------------------
Below is a list of environment variables that can be set:
FRAME2HTMLPRINTFILE (e.g. /local/lib/mif2gif.printsettings)
FRAME2HTMLTAGSFILE (e.g. /local/lib/mif2html.tags)
DOCUMENTLANGUAGE (US OR NO, US is default. This results in "Innhold" being
used instead of "Table of Contents", etc.)
Useage:
fm2html frame-file [title] [author]
Fm2html can take 3 parameters.
The first specifies the name of the file or book to translate.
The second optional parameter is the title of the file.
The third optional parameter is the author of the file.
mif2html can also be called instead of fm2html if you have
transformed to mif already. mif2html takes the same parameters
as fm2html (except the first that must be a mif file).
fm2mif can be used to translate frame files to mif.
It takes as its only parameter the name of the frame
file.
Warning:
The filter operates in the current version on
your local directory. It uses a lot of memory and will
very easily run out of space, unless you give it a lot
of swap space.
Some comments:
The tags files describe the connection between FrameMaker
tags and the internal tags of the filter. These internal
tags are mapped to HTML tags. When the filter program is
run, it checks whether there exists a file called <filename>.tags,
where <filename> is the name of the file or book to
translate. If no such file is found, the filter checks whether
the FRAME2HTMLTAGSFILE environment variable is set. If
it is, the corresponding file is used. If the environment
variable is not set, then the default file is used. The
default file is $LIBDIR/mif2html.tags.
The tags file uses TABs to separate internal tags and
FrameMaker tags. To see a list of the internal tags,
have a look at the tags file.
You may have to change the line in the start of the perl
scripts identifying the location of the perl interpreter.
Do this in the Makefile.
You must edit the destination location for files
(LIBDIR and BINDIR) to a suitable
directory. Then run 'make install'.
You will probably have to edit the directories in ps2gif
so that they show where the pnm and ppm filters lie. Other
programs that have to be available on your machine include
gs (GhostScript), FrameMaker (fmbatch), flex, yacc and cc.
You can included links to other html documents in your FrameMaker
document by using Markers of the type 'Hypertext'. The marker
text is assumed to be an URL, e.g. "http://www.nta.no/".
Any text following the marker (until the end of the line or until
another marker or such in the text) becomes a link in your HTML
file to the file given by the marker text. Tip: To avoid having too
much text highlighted, have a marker (not Hypertext)
denoting the end of the text to be highlighted. FrameMaker newlink,
openlink and gotolink are now supported.
Any paragraphs of the type 'TITLE' will become the title of
the document and will be moved to the top of the document
(or of the book document, if the file being translated
is a book).
Have a look at the Demo.doc file (Demo.html) to see an example file.
Frequently asked questions:
o Where can I find the pbmplus (pnm and ppm filters) package?
See a list of locations given by archie in "WhereToFindPbmPlus".
o Where can I find flex?
See a list of locations given by archie in "WhereToFindFlex"
o What is the fl (-lfl) library?
It is the flex libary.
-----------------------------------------------------------------------------------
version 0.8.4
o Unlisted headings (UHEADING) added. Do not show in the table of contents.
o Table of contents cleaned up and changed in appearance (bold major headings
and less space between lines).
o Table Headings and title are bold.
o Figure text is now bold.
o Fixed links to tables bug.
o Bold and italics are now handled in tables (works only with Mosaic 2.2 and newer).
o Figures and mathematic formulas are no longer totally removed from tables. Instead,
a link with the tekst "(fig)" is generated. Clicking the link shows the missing
graphic or math formula.
o FrameMaker hypertext handling extended.
o FrameMaker hypertext links (openlink and gotolink) are now handled (Stephen Martin).
o Removed any tags from <TITLE> field as WinMosaic displays them.
o Changed mif2gif so that the files are opened and closed in order instead
of opening all at the same time. Saves space...
o Introduced use of TMPDIR variable instead of /tmp. /tmp is used when the
TMPDIR variable is not set (Bob Jackson).
o Changed extractmifhead.pl and trans.l to follow FrameMaker 4 standard.
(Bob Jackson).
o Modified yyerror and changed YYMAXDEPTH variable to allow the converter to
work on SGI systems running IRIX-4.0.5 (Jan van der Steen).
o Fixed unfinished indenting bug.
o Norwegian Document Language now works.
o Fixed multiple .html`s in references between files.
o New tags, some old tags dropped.
o Updated and documented tags file.
o Changed insertcharacters.l so that special characters are handled correctly
when compiled with cc as well as gcc.
o Made links inside files skip filename, so that the file is not re-read.
(Dropped because this still messes up back and forward in Mosaic).
o Made the use of the FRAME2HTMLPRINTFILE env variable optional
(Duncan Fraser).
o Prepared special characters somewhat for the acceptance of the proposed HTML+
character set (α etc.).
version 0.8.3 (Jan. 3. 1994)
o Fixed bug with links between files in a book (Daniel K. Schneider).
o Fixed continuing symbolfonts bug.
o Fixed symbolfonts and tags bug.
o Bugfixes. Hopefully the end of the 'Error in parsing. Got <Char whatever>.'
version 0.8.2 (Nov. 30. 1993)
o Fixed figure or table at end of file disappearance bug.
o Fixed footnote in table bug.
o Figures are now also links to themselves. This enables the reader
to resize the figures if the viewer allows this (e.g. xv).
o Colour figures.
o .doc stripped (Duncan Fraser).
o Hypertext markers in Frame Documents are assumed to be HTML links.
The following text becomes a link to the document given by the
FrameMaker marker. Markers can be put in tables as well. However,
figures can not be links... except to themselves... for now anyway.
o More bugfixes
version 0.8.1. (Nov. 24. 1993)
o Various bug fixes.
o More translation.
o Improved list handling (Duncan Fraser).
o Fixed Makefile bugs (missing addtextrect).
o Fixed bug with files ending in ".doc".
version 0.8 (Nov. 8. 1993)
o Book bug fixes.
o Translated to English
o Index generation improved.
o Bugfixes.
o Renamed files.
o Updated mif2html.tags file.
o Added consecutive numbered lists.