What is rtftohtml?
rtftohtml
is a tool to turn your, say, Word documents into documents which may be read
from within the World Wide Web. The format of these documents is called
HyperText Markup Language (HTML).
rtftohtml is able to automatically convert documents stored in RTF (Rich
Text Format)
to HTML. Most word processors in use on UNIX, Macintosh, PC or NeXT systems can
export their documents in RTF format (hint: have a look at the "Save as..."
dialog box of your favorite word processor).
In processing text, rtftohtml chooses HTML markup based on three
characteristics. These are
- The destination
of the text. Example destinations are header, footer, footnote, picture.
- The paragraph style.
Paragraph styles are user-definable entities, but some are pre-defined by the
word processing package. For Microsoft Word (on the Macintosh) examples are
"Normal" and "heading 1" or ("<berschrift 1" when using a german version).
- The text attributes.
Examples of text styles are bold, courier, 12 point.
The filter has built-in rules for dealing with destinations. For paragraph and
text styles, the rules for translation are contained in a file called html-trn.
By modifying this file, you can train rtftohtml to perform the correct
translations for your documents. The most common change that you will need to
make is to add your own paragraph styles to html-trn.
rtftohtml should produce reasonable HTML output for most documents. Here is
what you can expect:
- Your output should appear in a file called "xx.html" where "xx" or
"xx.rtf" was your input file name.
- Bold, italic and underlined text should appear with <b>,<i>
and <u> markup
- Courier font text should appear with <tt> markup
- Tables will be formatted with HTML table markup.
- Footnotes will appear at the end of the current document with hypertext
links to them.
- Table of contents, indexes, headers and footers are discarded.
- Table of Contents entries and paragraphs with the style "heading 1..6"
will generate a hypertext Table of Contents in a separate file. Each table of
contents entry will link to the correct location in the main document.
- All paragraph styles used in your document should appear in the file
"html-trn". This allows you to create a mapping from any paragraph style to any
HTML markup. There are many pre-defined styles in html-trn, including "heading
1..6". (If a paragraph style is not found, a warning will be generated and the
text will be written to the HTML file with no special markup.)
- Each graphic in your file will be written out to a separate file. The
filename will be "xxn.ext" where "xx" or "xx.rtf" was your input, "n" is a
unique number and "ext" will be either "pict" for Macintosh PICT format
graphics or "wmf" for Windows Meta-Files format graphics. The HTML file will
create links to these files, using either "<A HREF=" or "<IMG SRC="
links. SINCE most WWW browsers do not understand "wmf" or "pict" format
files, the link will be to xxn.gif. This presumes that you will run some
other filter to translate your graphic files to gif.
- Text that is connected with copy/paste-link constructs, or tagged with
some special text attributes will generate hypertext links.
RTFtoHTML converts a linear RTF-Document (that may contain cross references,
index entries and footnotes) into a fully hypertexted set of HTML-Documents.
This document, that you are reading right now, is an example of what you can
expect from using rtftohtml.
The 3.0 release added the following features to rtftohtml:
- splitting of the document:
RTFtoHTML uses the headlines to determine
where to split (the splitting depth is adjustable by the user, see also section Headings)
- fully customizable navigation panels on top and bottom of each page (see
sections Headings
and Navigation panel)
- active Cross references
to headings, mail addresses and URLs
- automatic generation of an active table of contents
- automatic generation of an active Index
- support for a few of Netscape's HTML extension, such as the
<center> tag and background images (see also section Navigation panel)
and of course: this
Guide
To Using rtftohtml