Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HTML converter for MIF?

49 views
Skip to first unread message

Frontline Distribution L

unread,
Mar 23, 1994, 9:25:03 AM3/23/94
to
The 'main' WWW server at CERN has a FrameMaker <--> HTML filter which
looks pretty good (untested at this site as yet).

Try anonymous ftp to info.cern.ch in the pub/WWW/src directory.

Regards,
Mike Cherry

Susan Gallagher

unread,
Mar 23, 1994, 5:35:59 PM3/23/94
to
Can someone tell me the name of the file? I can't find it in the
pub/www/src directory of info.cern.ch.

Thanks,

su...@gordian.com
Gordian (714)850-0205
20361 Irvine Ave. (714)850-0533 FAX
Santa Ana Heights, CA 92707

Message has been deleted

Jon von Tetzchner Stephenson

unread,
Mar 29, 1994, 6:15:54 AM3/29/94
to

You might also want to have a look at my fm2html converter. It
converts only from FrameMaker to HTML, though. Not the other
way around.

Get it from : bang.nta.no, pub directory.

Below is some information about the last release.

------------------


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.
o The converter can be set up so that FrameMaker saves
in HTML 'directly'.

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.
o Some colour figures are not translated well.

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,
Russ Rew of UCAR Unidata Program,
Michael McIlrath of MIT,
Anthony Thyssen of Griffith University,
Eric Richards of Intel Supercomputer Systems Division,mp.$pid
Roar Smith of L. M. Ericsson A/S,
Rob Kooper, Bob Jackson, Phil Hooper and Yen Lee
for their assistance in improving this program.

Availability:

ftp bang.nta.no:pub/fm2html.tar.v.0.n.m.Z.


Disclaimer:

Use this program at your own risk.


----------------------------------------------------------------------------


Below is a list of environment variables that can be set:

MIF2GIFPRINTSETTINGSFILE (e.g. /local/lib/mif2gif.printsettings)
MIF2HTMLTAGSFILE (e.g. /local/lib/htags)
DOCUMENTLANGUAGE (US OR NO, US is default. This results in "Innhold" being
used instead of "Table of Contents", etc.)

Useage:
See the man page.

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>.htags,
where <filename> is the name of the file or book to
translate. If no such file is found, the filter checks whether
the MIF2HTMLTAGSFILE 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/htags.

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.bok, Demo1.doc and Demo2.doc files to get an
idea of what can be achieved.

It is possible to save FrameMaker documents in HTML directly (Do save
the file as a FrameMaker document as well, though). Here is what must
be done:

1. Make a .fminit2.0 or such directory.
2. Edit the MifWrite shell script or copy the
one provided to the .fminit2.0 directory.

After that you can save HTML documents by:

1. Choose 'Save As'.
2. Select 'Maker Interchange Format'.
3. Change the file extension to '.html'.
4. Save.

The output from the converter will come in the directory from which
FrameMaker was started.

When converting MAC documents, make sure that the documents are
converted correctly from MAC to UNIX format. Especially consider
end of line characters. If these are incorrect, you will get
a scanner overflow.


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"
and "WhereToFindNetPbm". It is recommended that you use netpbm
as it is more recent.

o Where can I find flex?

See a list of locations given by archie in "WhereToFindFlex"

-----------------------------------------------------------------------------------

Jon Stephenson von Tetzchner
Norwegian Telecom Research
E-mail : jo...@hal.nta.no


------------------

version 0.8.7 (Mar. 28 1994)

o First version of a man page for fm2html.
o Copy made of mif2gif.printsettings if not specified in an ENV
variable. Solves problems with printsettings files in non-
writeable directories (FrameMaker wants to lock it, it is
a FrameMaker file) (Roar Smith)
o Detect \\ and output \ (Eric Richards)
o Detect \q and output quote (Eric Richards)
o Allow em-dash and en-dash output to be overridden (Eric Richards)
o Do basic variable expansion (Eric Richards)
o Additional indented styles (GLOSSARY2 and 3, COMGLOSSARY2 and 3)
(Eric Richards)
o Ignore TOC and do not output anything that might mess up current
paragraph numbering (Eric Richards)
o For GLOSSARY type styles, consider HardReturn to be the same
as a TAB (Eric Richards)
o new filters mif2mif and miftags, with manpages (Duncan Fraser)
o new filter mif2fm (Duncan fraser)
o scripts now look for local tags file; if local file not found, global
file copied to local directory (Duncan Fraser)
o global tags files now called ptags, ctags and htags (Duncan Fraser)
o each doc in book includes a link up to table of contents (Duncan Fraser)
o links to previous/next chapter and table of contents, with icons,
appear both at top and bottom of each document in a book (Duncan Fraser)
o fm2mif is now capable of converting books, i.e. it converts all files
in the book as well as the book itself (Duncan Fraser)
o fm2hmtl invokes fm2mif directly to convert files to MIF before invoking
mif2html (previously, fm2mif was invoked in book.c) (Duncan Fraser)
o when mif2html processes a book file, it does not call fm2mif but instead
assumes that files in the book have already been converted to MIF
(Duncan Fraser)
o "-ng" (no graphics) option added to mif2html, which causes conversion of
graphics to be omitted (links to graphics are still included in the output,
but time can be saved when reconverting documents) (Duncan Fraser)
o -PERL-, -FMBATCH-, -LIBDIR- and -TMPDIR- sedded in Makefile... TMPDIR can
also be specified as environment variable, or default to cwd (Duncan Fraser)
o replace getppid with $$ (otherwise a user running simultaneous processes
will overwrite his/her own temporary files) (Duncan Fraser)
o -xdpi and -ydpi parameters added. Set to higher values than 75 to
enhance picture size and quality.
o ps2gif extended to convert full postscript files to multiple gif files.
o Fixed extended bold/italics/etc. in paragraphs (Michael McIlrath).
o Added information about how to save HTML files directly from
FrameMaker.

version 0.8.6a (Mar. 10 1994)

o Removed the use of -lfl (flex libray), added main.
Should remove the problems people have been having with
linking with the flex library.

version 0.8.6 (Mar. 7 1994)

o Fixed stack overflow problem with yacc and NOW bison works.
o Fixed bug with compiling with gcc...
o translate renamed fthtranslate as the translate name is in use on some systems.
o extractmifhead included in f2htranslate.
o Command line interface changed.
o mif2html, bookfile and makerfile included in fm2html.
o HEADING0, UHEADING0 and INDENTHEADING0 added. Use <H1>.

version 0.8.5 (Feb. 25 1994)

o INDENTHEADING now available from1 to 6.
o LOCALTITLE tag added.
o PROGRAM tag now handled correctly.
o Various table bugs fixed.
o Added local title handling. Each file in a book can now have a title.
o Added \\q handling (Yen Lee).
o Expanded regognition of FrameMaker hypertext. Now recognizes file:firstpage and
file:lastpage.
o Fixed multiple lines in single cell table bug.
o Made the code compatible with gcc + flex + bison.
If you want to use bison, change all occurances of "y.tab.c" to
"trans.tab.c".
o Fixed bug with books and no Language variable (Russ Rew & Phil Hooper).

version 0.8.4 (Feb. 11 1994)

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 (&alpha; 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.


--


----------------------------
Jon Stephenson von Tetzchner
Norwegian Telecom Research
jo...@hal.nta.no
----------------------------

Wyser Martin

unread,
Mar 30, 1994, 1:23:31 PM3/30/94
to
You will find the html to frame converter at
ftp info.cern.ch in pub/www/contrib.

The files are named
www_and_frame-0.2.tar.Z
www_and_frame-README

Martin Wyser
NOT speaking for Union Bank of Switzerland
zh...@zh014.ubs.ubs.ch

0 new messages