\documentstyle[a4wide,makeidx,texhelp]{report}
\input psbox.tex
\parskip=10pt%
\parindent=0pt%
\title{Manual for Tex2RTF 1.0: a \LaTeX\ to RTF and HTML converter}
\author{Julian Smart\\Artificial Intelligence Applications Institute\\
University of Edinburgh\\EH1 1HN}
\date{October 1993}%
\makeindex%
\begin{document}%
\maketitle
%\newpage%
\tableofcontents%
\bibliographystyle{plain}

\chapter*{Copyright notice}

Copyright (c) 1993 Julian Smart.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose is hereby granted without fee, provided that the
above copyright notice, author statement and this permission notice appear in
all copies of this software and related documentation.

THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

IN NO EVENT SHALL JULIAN SMART OR THE ARTIFICIAL INTELLIGENCE
APPLICATIONS INSTITUTE OR UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY
SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

\chapter{Introduction}

This document describes a utility for converting \LaTeX\ files into
several other formats, and the C++ library which the converters rely on for
parsing and other services.

Only a subset of \LaTeX\ can be processed by this utility, especially
since the target document language will never perfectly match \LaTeX.
Whether the quality of the results are good enough will depend upon the
application and your own expectations.

Tex2RTF is heavily biassed towards making on-line, hypertext versions of
\LaTeX\ documents, but the RTF converter can be used for normal, linear
documents too.

The latest version of Tex2RTF can be accessed by anonymous ftp from
skye.aiai.ed.ac.uk (192.41.104.6) in the directory /pub/tex2rtf.
It is available in SPARC Open Look and Windows 3.1 versions.

Tex2RTF was developed using the free Open Look/Motif/Windows 3.1 C++
class library wxWindows, also available from the above FTP site in the
/pub/wxwin/beta directory.

\section{Why use \LaTeX?}

\LaTeX\ happens to be a very convenient format if you need to produce
documents (such as manuals, help facilities, up-to-date information) in
both printed and on-line media. Being a language rather than a WYSIWYG system,
it allows explicit specification of layout and document structure, lending
itself well to hypertext applications and automatic document generation.
Many people also prefer to use \LaTeX\ for ordinary use since it encourages
a logical document structure and the user is not distracted by having to perfect
the appearance; many layout decisions are taken by \LaTeX\ automatically.

Although \LaTeX\ is not as fancy as modern word processors and desk-top
publishing packages, it is for many purposes quite adequate, and sometimes
more flexible than its modern counterparts.

The conversion utility gives \LaTeX\ a new lease of life by allowing
virtually all other wordprocessor formats to be generated from documents
containing a reasonable subset of \LaTeX\ syntax. From the same \LaTeX\ 
sources, we can now generate printed manuals, Windows Help files, wxHelp
files, RTF-compatible word processors formats such as MS Word, and HTML
files for use in the World Wide Web. Since the conversion tool is
free, as are \LaTeX, HTML viewers, wxHelp and (effectively) Windows
Help, there are no financial or time penalties for providing
documentation in a wide range of printed and hypertext formats.

\section{Output Formats}

At present the following output formats are supported:

\begin{itemize}
\item RTF (Rich Text Format). This is the most well-developed
converter. RTF is commonly used as a document exchange format amongst
Windows-based applications, and is the input for the Windows Help
Compiler. Tex2RTF supports both linear documents and Windows Help
hypertext format.
\item wxHelp. This is the platform-independent help system for
the class library wxWindows \cite{smart93a}. It can display ASCII files with embedded codes
for changing font styles, but no formatting is done by wxHelp.
\item HTML (Hypertext Markup Language). This an SGML-like format
commonly used by documents in the World Wide Web distributed hypertext
system, and formats text dynamically rather like Windows Help.
\end{itemize}

\section{What compromises must I make?}

As a \LaTeX\ user, you need to be aware that some macros or facilities
don't transfer to other formats, either because they are not supported
by the target format or because the converter does not support them. 
Example of this are the footnote macro, and all maths formatting.

Sometimes \LaTeX\ facilities must be accessed in a slightly different
way to support the variety of formats, particularly hypertext formats
where \LaTeX\ references are often replaced by hypertext jumps (but must
still look right in printed documentation). Tables don't transfer well
to RTF (and not at all to the other formats) but an attempt is made
to approximate tables so long as special row macros are used, instead
of the usual end of row delimiter.

Bibliographies are handled quite well since the utilities can read
in {\tt .bib} files and resolve citations. Bibliographies are not
yet supported in Windows Help files, and the references are not
yet sorted alphabetically. Numbers are used in citations.

Pictures are handled in a limited way: if the PSBOX macro package
is used, an {\it image} macro can be used to place Encapsulated PostScript
files in \LaTeX, and Windows RGB-encoded bitmap files when converting
to RTF.

Paragraph indentation is a little weak at present, but some is done
automatically, in list and quotation environments. More flexible control
will be added later.

Nested file inclusion (input, include, verbatiminput), is handled,
and the comment environment is supported. However, using {\it input}\rtfsp
to include macro packes is not advisable, although the psbox.tex package
is ignored. In later versions, it should be possible to specify
files to ignore.

Because of the way \LaTeX\ is parsed, some syntax has to conform to a
few simple rules. Macros such as {\it bf} and {\it it} need to occur
immediately after a left brace, and have a block of their own, since
the text within their scope is regarded as its argument. This syntax
means the same thing as using {\it begin ... end}, which is usually
a one argument macro (the argument is the text between the {\it begin}\rtfsp
and {\it end}). See \helpref{Space}{space}.

As a Windows hypertext help writer, you don't have access to all
RTF commands but you'll be able to get most of what you want.
In particular, any \LaTeX\ document you write will automatically
be a hypertext document, because the converter takes advantage of
the hierarchy of sections. Futher jumps can be placed using
a combination of the \helprefn{label}{label} and \helprefn{helpref}{helpref} macros.

Similarly, HTML support is largely automatic, and multiple files
are generated from one \LaTeX\ file since browsing HTML works best with
many small files rather than a few large ones.

wxHelp files are least well supported since there is no formatting
support, only font style, sizes and colours. Still, some hypertext help
support on UNIX/X platforms is better than none. The class library
wxWindows may be extended in future to allow using a better help viewer,
such as {\it xmosaic}. Of course there is nothing to stop xmosaic being
used as a help system, but it won't be integrated with wxWindows
programs as wxHelp is.

Sometimes you will use a local macro package that is unrecognised by
the converters. In this case, you may define a custom macro file
where macros are defined in terms of supported \LaTeX\ commands
and text. Even if the result is not the same as in \LaTeX, you
can probably end up with something adequate, and at least avoid
undefined macro errors. See \helpref{Errors}{errors} for further
information.

\section{Changes to \LaTeX\ syntax}

Here are the conventions you need to observe to satisfy the Tex2RTF
parser.

\subsection{Space}\label{space}

Tex2RTF attempts to insert spaces where \LaTeX\ assumes whitespace.
However, for the benefit of RTF conversion, you need to use the {\it
$\backslash$ rtfsp} macro where a command or brace within a paragraph
begins or ends with a macro. For example:

\begin{verbatim}
Within a paragraph, you need to be careful about commands that begin
\rtfsp {\it at the start} of a line.
\end{verbatim}

As normal with \LaTeX, two newlines represents a paragraph break,
although \helprefn{par}{par} can also be used at the end of a paragraph.

You need to have a blank line between section and some environment
commands and the first paragraph or your document will look rather
weird, e.g. headings running into paragraphs.

wxHelp is more fussy than \LaTeX\ or RTF: you need to use percent
characters at line ends liberally to eliminate newlines after commands
on single lines.

\subsection{Command arguments}

All commands which have more than one argument can be used in the following
three ways:

\begin{verbatim}
\begin{bf}
Some text.
\end{bf}

\bf{Some text.}

{\bf Some text.}
\end{verbatim}

With the third method, it is important that the command has its own
pair of braces, and that the command immediately follows the first brace.
Otherwise, the parser cannot parse the argument(s) properly.
With multiple arguments, each should be enclosed in braces.

Optional arguments are specified using square brackets or parentheses.

Whitespace should be avoided between command names and their arguments.

\subsection{Labels}

The {\it label} command may be used for sections and figure captions,
but must come immediately after the section or caption commands with no
intervening whitespace.

\chapter{Hypertext features}

\LaTeX\ is inherently suitable for specifying hypertext documents since
it encourages description of the logical structure of a document using
section commands. Therefore, a \LaTeX\ document is automatically
a hypertext document, without any further editing.

For Windows Help, a single RTF is generated with topics corresponding to
sections. A top level contents page shows each chapter or top-level section,
and each chapter or section ends with a list of further sections or subsections.
Similarly, a single wxHelp XLP file may be generated.

For HTML, a different file is generated for each section, since the XMOSAIC browser
works best with a large number of small files. The files are named automatically
based on the name of the output file, with the contents page filename being
formed from the output filename with {\tt \_contents} appended to the name.
This may result in the generation of several hundred files for a large \LaTeX\ 
input file. 

To specify explicit jumps around a hypertext file, the \helprefn{helpref}{helpref} macro is
used. The first argument is the text to be displayed at the point of reference,
which will be highlighted in a hypertext file to allow jumping to a reference.
The second argument is the reference label (there should be a corresponding
\rtfsp\helprefn{label}{label} command in the file, following a section or figure).

A first optional argument (written in square brackets) specifies a filename
which contains the given reference. (Not yet implemented.)

To use extra features such as {\bf helpref} and the C++ and CLIPS class
reference documentation features, include the style file {\tt texhelp.sty}.

\chapter{Running Tex2RTF}

Tex2RTF accepts two arguments (input and output filenames) and trailing
(optional) switches.  If both filenames are given, the utility will work
in batch mode.  Otherwise, a main window will be shown, will appropriate
menu items for selecting input and output filenames, starting off the
conversion process, and so on.

It is recommended that you run Tex2RTF twice in order to be sure of
of resolving all references and including an up-to-date contents page.

\begin{description}
\item[-interactive] Forces interactive mode even if both
filenames are given.
\item[-macros filename] Specifies a file for the custom macro
file -- see \helpref{Macro not found error}{macronotfound}.
\item[-winhelp] Specifies Windows Help RTF output.
\item[-rtf] Specifies linear RTF output.
\item[-html] Specifies HTML (World Wide Web) output.
\item[-twice] Tells Tex2RTF to run the conversion twice to ensure all
references and citations are resolved and the contents page included.
\end{description}

\chapter{Macro reference}

The following lists macros which are recognised by the converters. Other
macros not not mentioned can be assumed to be unrecognised or ignored.
Each macro is given with its number of arguments (not including any
optional arguments).

\section*{abstract:1}\label{abstract}

Writes the title {\bf Abstract}. Linear RTF.

\section*{addcontentsline:3}\label{addcontentsline}

Adds a title to the contents page. Linear RTF.

%\section*{appendix}
%\section*{arabic}
%\section*{array}
\section*{author:1}\label{author}

Defines the author, for output when {\it maketitle} is used.

\section*{backslash:0}\label{backslash}

Outputs a backslash in math mode (should be enclosed by two dollar symbols).

%\section*{baselineskip}
\section*{bf:1}\label{bf}

Specifies bold font.

\section*{bibitem:2}\label{bibitem}

For convenience, {\it bibitem} has two arguments: label and item.
\rtfsp\LaTeX\ syntax permits writing this as if it were two arguments,
even though it is in fact only one.

\section*{bibliographystyle:1}\label{bibliographystyle}

Currently doesn't affect the style of bibliography, but probably will
in the future.

\section*{bibliography:0}\label{bibliography}

Includes the bibliography at this point in the document.

\section*{boxit:1}\label{boxit}

Draws a box around the paragraph.

%\section*{caption*}
\section*{caption:1}\label{caption}

Specifies a caption (within a \helprefn{figure}{figure} environment). This may
be followed immediately by a \helprefn{label}{label} command.

\section*{cdots:0}\label{cdots}

Outputs three dots.

\section*{centerline:1}\label{centerline}

Centres (or centers!) a line of text.

%\section*{centering}
\section*{center:1}\label{center}

Centres a block of text.

\section*{cextract:0}\label{cextract}

Prints a C++ extraction operator (\cextract).

\section*{chapter*:1}\label{chaptersX}

Outputs a chapter heading with no contents entry.

\section*{chapter:1}\label{chapter}

Outputs a chapter heading.

\section*{cinsert:0}\label{cinsert}

Prints a C++ insertion operator (\cinsert).

\section*{cite:1}\label{cite}

Cite a reference. The argument is a reference key as defined in a \LaTeX\ .bib
file.

\section*{class:1}\label{class}

Outputs the argument, an index entry (\LaTeX\ only) and a keyword entry (WinHelp only).
Used in class reference documentation.

%\section*{cleardoublepage}
%\section*{clearpage}
%\section*{cline}
\section*{clipsfunc:3}\label{clipsfunc}

Formats a CLIPS function, given the return value, function name, and
arguments.

%\section*{columnsep}
\section*{comment:1}\label{comment}

Allows large comments in \LaTeX\ files. Ignored by Tex2RTF.

\section*{copyright:0}\label{copyright}

Outputs the copyright symbol.

\section*{cparam:2}\label{cparam}

Formats a CLIPS type and argument. Used within the third argument of
a \helprefn{clipsfunc}{clipsfunc} command.

\section*{date:1}\label{date}

Specifies the date of a document; only output by \helprefn{maketitle}{maketitle}.

\section*{description:1}\label{description}

A list environment, where each \helprefn{item}{item} command must be
followed by optional (!) square-bracketed text which will be highlighted.

%\section*{destruct:1}\label{destruct}
\section*{documentstyle:1}\label{documentstyle}

Specifies the main style (report, article etc.) and, optionally, style files
such as {\tt texhelp.sty}. A report has \helprefn{chapters}{chapter}, while an article's top-level
sections are specified using \helprefn{section}{section}.

\section*{document:1}\label{document}

This environment should enclose the body of a document.

%\section*{doublespace}\label{doublespace}
\section*{em:1}\label{em}

Emphasizes text (italic in RTF).

\section*{enumerate:1}\label{enumerate}

Enumerate list environment: numbers the \helprefn{items}{item}.

%\section*{equation}\label{equation}
%\section*{evensidemargin}
\section*{fbox:1}\label{fbox}

Boxes a paragraph in \LaTeX\ and RTF.

\section*{figure:1}\label{figure}

A figure enviroment: does nothin in RTF.

\section*{flushleft:1}\label{flushleft}

Flushes the given text to the left margin.

\section*{flushright:1}\label{flushright}

Flushes the given text to the right margin.

%\section*{footheight}\label{footheight}
\section*{footnote:1}\label{footnote}

Footnotes are not yet implemented in RTF: the text is bracketed instead.

%\section*{footskip}\label{footskip}
\section*{framebox:1}\label{framebox}

Boxes a paragraph in \LaTeX\ and RTF.

\section*{functionsection:1}\label{functionsection}

Defines a subsection, adding the C++ function name to the \LaTeX\ index or the
WinHelp keyword list.

Should be followed by a \helprefn{func}{func} command to specify function
details.

\section*{func:3}\label{func}

Defines a C++ function, given the return type, function name, and parameter list.

Should occur after a \helprefn{functionsection}{functionsection} command.

%\section*{glossary:}\label{glossary}
%\section*{gloss}\label{gloss}
%\section*{headheight}\label{headheight}
\section*{helpignore:1}\label{helpignore}

Ignores the argument in Tex2RTF generated files, but not \LaTeX.

\section*{helponly:1}\label{helponly}

Only outputs the argument in Tex2RTF generated files.

\section*{helpinput:1}\label{helpinput}

Only includes the given file in Tex2RTF generated files.

\section*{helpfontfamily:1}\label{helpfontfamily}

Specifies the font family for Tex2RTF generated files. The argument
may be Swiss or Times.

\section*{helpfontsize:1}\label{helpfontsize}

Specifies the font size for Tex2RTF generated files.

\section*{helpref:2}\label{helpref}

Specifies a jump to a labelled chapter, section, subsection subsubsection
or figure.

The first argument is text to be highlighted (mouseable in help systems)
and the second is the reference label. In linear documents, the section number
is given following the text, unless the \helprefn{helprefn}{helprefX} command
is used instead, where the section number is suppressed.

An optional first argument in square brackets specifies a filename where
the topic is found (not yet implemented).

\section*{helprefn:2}\label{helprefX}

Specifies a jump to a labelled chapter, section, subsection subsubsection
or figure.

The first argument is text to be highlighted (mouseable in help systems)
and the second is the reference label.  See \helprefn{helpref}{helpref} for
the form where the section number is printed in linear documents.

An optional first argument in square brackets specifies a filename where
the topic is found (not yet implemented).

%\section*{hfill}\label{hfill}
\section*{hline:0}\label{hline}

Within a \helprefn{tabular}{tabular} environment, draws a horizontal
rule below the current row.

\section*{hrule:0}\label{hrule}

Draws a horizontal line below the current paragraph.

%\section*{hspace*}\label{hspaceX}
%\section*{hspace}\label{hspace}
%\section*{hskip*}\label{hskipX}
%\section*{hskip}\label{hskip}

\section*{huge:1}\label{huge1}

Outputs the argument in huge text.

\section*{Huge:1}\label{Huge2}

Outputs the argument in huger text that \helprefn{huge}{huge1}.

\section*{HUGE:1}\label{HUGE3}

Outputs the argument in huger text that \helprefn{Huge}{Huge2}.

%\section*{includeonly}\label{includeonly}
\section*{include:1}\label{include}

Include the given file. The command must not be preceded by any whitespace,
and spurious whitespace between elements of the command will also
trip up Tex2RTF.

%\section*{index:0}\label{index}
\section*{input:1}\label{input}

Include the given file. The command must not be preceded by any whitespace,
and spurious whitespace between elements of the command will also
trip up Tex2RTF.

\section*{itemize:1}\label{itemize}

Indents each \helprefn{item}{item} of a list and precedes with a bullet.

\section*{item:0}\label{item}

Marks an item of a \helprefn{itemize}{itemize}, \helprefn{description}{description} or \helprefn{enumerate}{enumerate}
list. Items within a description environment should have an `optional' argument
in square brackets which will be highlighted.

\section*{image:2}\label{image}

This is translated to a PSBOX macro package {\it psboxto} command in \LaTeX,
the first argument being a sizing command and the second a filename.

In HTML mode, the second argument is used to generate a PostScript file reference.

In RTF mode, the second argument is used to find an RGB-encoded Windows
bitmap file and insert it in the output file. The file {\it must} be
RGB-encoded; RLE-encoded files don't seem to work. Note that this
facility has not been rigorously tested.

\section*{it:1}\label{it}

Marks the argument in italic.

%\section*{kill}\label{kill}
\section*{label:1}\label{label}

Labels the chapter, section, subsection, subsubsection or figure caption
with the given label. This must be an ASCII string, and duplicate items
with different case letters are not allowed.

The command must follow immediately after the section or caption command,
with no intervening whitespace.

\section*{large:1}\label{large1}

Marks the argument in large text.

\section*{Large:1}\label{Large2}

Makes the argument display in larger text than \helprefn{large}{large1}.

\section*{LARGE:1}\label{LARGE3}

Makes the argument display in larger text than \helprefn{Large}{Large2}.

\section*{LaTeX:0}\label{LaTeX}

Outputs the annoying \LaTeX\ upper and lower case name.

%\section*{lbox}\label{lbox}
\section*{ldots}\label{ldots}

Outputs three dots.

%\section*{linebreak}\label{linebreak}
%\section*{listoffigures}\label{listoffigures}
%\section*{listoftables}\label{listoftables}
%\section*{makeglossary}\label{makeglossary}
%\section*{makeindex}\label{makeindex}
\section*{maketitle}\label{maketitle}

Makes the article or report title by outputting the \helprefn{title}{title},
\rtfsp\helprefn{author}{author} and optionally \helprefn{date}{date}.

%\section*{markright}\label{markright}
%\section*{markboth}\label{markboth}
%\section*{marginparwidth}\label{marginparwidth}
%\section*{marginpar}\label{marginpar}
\section*{mbox:1}\label{mbox}

Draws a box around the given paragraph in \LaTeX\ and RTF, for example:

\mbox{This should be a boxed paragraph for highlighting important information,
such as information for registering a shareware program.}

\section*{membersection:1}\label{membersection}

Used when formatting C++ classes to print a subsection for the member name.

\section*{member:1}\label{member}

Used to format a C++ member variable name.

%\section*{multicolumn}\label{multicolumn}
%\section*{myheading}\label{myheading}
\section*{newcommand:3}\label{newcommand}

Define a new command; arguments are the command, the number of
arguments, and the command body. For example:

\begin{verbatim}
\newcommand{\crazy}[2]{{\bf #1} is crazy but {\bf #2} is not.}
\end{verbatim}

The command must have no whitespace at the start of the line or between
the three arguments.

New commands may also be defined in the {\tt tex2rtf.ini} file using
slightly different syntax (see \helpref{Macro not found error}{macronotfound}).

%\section*{newcounter}\label{newcounter}
%\section*{newline}\label{newline}
\section*{newpage:0}\label{newpage}

Inserts a page break.

\section*{nocite:1}\label{nocite}

Specifies that this reference should appear in the bibliography,
but the citation should not appear in the text.

See also \helprefn{cite}{cite}.

\section*{noindent:0}\label{noindent}

Sets paragraph indentation to zero. See also \helprefn{parindent}{parindent}.

%\section*{nolinebreak}\label{nolinebreak}
%\section*{nopagebreak}\label{nopagebreak}

\section*{normalsize:1}\label{normalsize}

Sets the font size back to normal.

%\section*{onecolumn}\label{onecolumn}
%\section*{oddsidemargin}\label{oddsidemargin}
%\section*{pagebreak}\label{pagebreak}
%\section*{pageref}\label{pageref}
%\section*{pagestyle}\label{pagestyle}
%\section*{pagenumbering}\label{pagenumbering}
%\section*{paragraph*}\label{paragraphX}
%\section*{paragraph}\label{paragraph}

\section*{param:1}\label{param}

Formats a C++ type and argument pair. Should be used within the third argument
of a a \helprefn{func}{func} command.

\section*{parindent:1}\label{parindent}

Indents the first line of succeeding paragraphs by the given amount.

\section*{parskip:1}\label{parskip}

Changes the spacing between paragraphs. In fact, in RTF this will cause
two \helprefn{par}{par} commands to be output if parindent is greater
than zero.

%\section*{part*}\label{partX}
%\section*{part}\label{part}
\section*{par:0}\label{par}

Causes the paragraph to end at this point. \LaTeX\ and Tex2RTF also
treat two consecutive newlines as a paragraph break.

%\section*{pfunc}\label{pfunc}
%\section*{picture}\label{picture}
%\section*{printindex}\label{printindex}
\section*{psboxto:2}\label{psboxto}

Identical to \helprefn{image}{image}.

%\section*{psbox}\label{psbox}
\section*{quote:1}\label{quote}

Indents a short quotation.

\section*{quotation:1}\label{quotation}

Indents a long quotation.

%\section*{raggedbottom}\label{raggedbottom}
%\section*{raggedleft}\label{raggedleft}
%\section*{raggedright}\label{raggedright}
\section*{ref:1}\label{ref}

In \LaTeX\ and linear RTF, refers to a \helprefn{label}{label} and
causes the number of that section or figure to be printed.

\section*{rm:1}\label{rm}

Causes the argument to be formatted in a plain, roman font.

%\section*{roman}\label{roman1}
%\section*{Roman}\label{Roman2}
\section*{rtfsp:0}\label{rtfsp}

Outputs a space in RTF. Tex2RTF tries to insert a space where one is implied
by a newline, but cannot cope where a line starts or ends with a command,
in the middle of a paragraph. Use this command to insert a space explicitly.

\section*{sc:1}\label{sc}

Prints the output in small capitals.

\section*{section*:1}\label{sectionX}

Section header, with no entry in the contents page.

\section*{section:1}\label{section}

Section header, with an entry in the contents page.

%\section*{setcounter}\label{setcounter}
%\section*{sf}\label{sf}
\section*{shortcite:1}\label{shortcite}

The same as \helprefn{cite}{cite}.

%\section*{singlespace}\label{singlespace}
%\section*{sloppypar}\label{sloppypar}
%\section*{sloppy}\label{sloppy}
%\section*{sl}\label{sl}

\section*{small:1}\label{small}

Prints the argument in a small font.

%\section*{subitem}\label{subitem}
%\section*{subparagraph*}\label{subparagraphX}
%\section*{subparagraph}\label{subparagraph}
%\section*{special}\label{special}

\section*{subsection*:1}\label{subsectionX}

Subsection header, with no entry in the contents page. 

\section*{subsection:1}\label{subsection}

Subsection header, with an entry in the contents page. 

\section*{subsubsection*:1}\label{subsubsectionX}

Subsubsection header, with no entry in the contents page. 

\section*{subsubsection:1}\label{subsubsection}

Subsubsection header, with an entry in the contents page. 

\section*{tabbing:1}\label{tabbing}

Tabbing environment: doesn't work properly in RTF.

\section*{tableofcontents:0}\label{tableofcontents}

Inserts the table of contents at this point.

%\section*{table}\label{table}
\section*{tabular:2}\label{tabular}

Tabular environment: an attempt is made to output something
reasonable in RTF and XLP formats, although only simple
tables will work.

%\section*{tab:1}\label{tab}
\section*{TeX:0}\label{TeX}

Outputs the annoying \TeX\ upper and lower case name.

%\section*{textwidth}\label{textwidth}
%\section*{textheight}\label{textheight}
%\section*{thebibliography}\label{thebibliography}
%\section*{titlepage:0}\label{titlepage}

\section*{title:1}\label{title}

Sets the title, to be output when the command \helprefn{maketitle}{maketitle}
is used.

\section*{tiny:1}\label{tiny}

Prints the argument in a very small font.

\section*{today:0}\label{today}

Outputs today's date.

%\section*{topmargin}\label{topmargin}
%\section*{topskip}\label{topskip}
\section*{tt:1}\label{tt}

Outputs the argument in teletype font.

%\section*{typein}\label{typein}
\section*{typeout:1}\label{typeout}

Outputs the text on the Tex2RTF text window.

%\section*{twocolumn}\label{twocolumn}
\section*{underline:1}\label{underline}

Underlines the argument.
  
%\section*{vdots}\label{vdots}
\section*{verbatiminput:1}\label{verbatiminput}

Include the given file as if it were within a \helprefn{verbatim}{verbatim}
environment. The command must not be preceded by any whitespace,
and spurious whitespace between elements of the command will also
trip up Tex2RTF.

\section*{verbatim:1}\label{verbatim}

Uses a fixed-width font to format the argument without interpreting
any \LaTeX\ commands.

%\section*{verb}\label{verb}
%\section*{verse}\label{verse}
%\section*{vfill}\label{vfill}
%\section*{vline}\label{vline}
%\section*{void}\label{void}
%\section*{vrule}\label{vrule}
%\section*{vspace*}\label{vspaceX}
%\section*{vskip*}\label{vskipX}
%\section*{vspace}\label{vspace}
%\section*{vskip}\label{vskip}

\chapter{Errors and bugs}\label{errors}

\section{Errors}

The following sections explain some of the errors that may occur,
and how to deal with them.

\subsection{Macro not found}\label{macronotfound}

This error indicates that Tex2RTF has not implemented a standard
\rtfsp\LaTeX\ macro, or that a local macro package is being used that
Tex2RTF does not know about. It can cause spurious secondary
errors, such as not recognising the end document command.

You can get round this by defining a macro file (default name {\tt tex2rtf.ini})
containing command definitions, such as:

\begin{verbatim}
\crazy      [2]{{\bf #2} is crazy but #1 is not}
\something  [0]{}
\julian     [0]{Julian Smart}
\end{verbatim}

New commands may be defined in \LaTeX\ files, but custom macro files
will have to be defined when local style files are being used.

\subsection{Unresolved references}

References and citations are usually resolved on a second pass of
Tex2RTF. If this doesn't work, then a missing label or bibliographical
entry is to blame.

\section{Bugs}

\begin{description}
\item[Command parsing.] If a command is used followed by inappropriate
argument syntax, Tex2RTF can crash. This an occur when a command is
used in an asterisk form that is only formed in the non-asterisk
variety. The non-asterisk form is assumed, which makes the following
asterisk trip up the parser.
\item[Bibliography.] There's no flexibility in the way references
are output: I expect I'll get round to doing something better,
but only if people tell me they need it!
\item[Tables.] Tables aren't handled very well. Any suggestions how
they could be done better?
\item[Footnotes.] Not yet supported, since I can't get MS Works to recognise
them in RTF files.
\item[Indexes and glossaries.] Not yet supported.
\end{description}

\newpage
% This bibliography included as a sample only.
\nocite{smart93a}%
\nocite{akagi87}%
\nocite{allen87a}%
\nocite{bruce82}%
\nocite{benyon88b}%
\nocite{drabble88}%
\nocite{forbus81}%
\nocite{allen87b}%

\bibliography{refs}

\end{document}

