Contents Up Previous Next

Changes to LaTeX syntax

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

Command arguments
Avoid the setlength command


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

    Within a paragraph, you need to be careful about commands
    \rtfsp{\it that begin at the start of a line.}
As normal with LaTeX, two newlines represents a paragraph break, although \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.

Command arguments

Commands that have one or more arguments can be used in the following three ways:

    \bf{Some text.}

    Some text.

    {\bf Some text.}
The first method is a normal LaTeX command.

The second method is called an environment; LaTeX has specific environments that do not always correspond to normal commands, but Tex2RTF recognizes environments and normal commands interchangeably, so long as the command has no more than two arguments.

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.

The braces that start command arguments must not be separated from the other arguments by whitespace. For example, the following produces an error:

and should be replaced by


Avoid the setlength command

Using the \setlength command doesn't work, since its first argument looks like a command with the wrong number of arguments. Use an alternative form instead, e.g.

    \parindent 0pt
instead of



Only a subset of LaTeX units may be used for specifying dimensions. Valid units are pt, mm, cm and in. Units should usually be specified for dimensions or the results may be unexpected.


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


For best layout, table rows should be enclosed in a \row or \ruledrow command, since Tex2RTF can't cope with parsing the LaTeX tabular syntax unaided. However, if you really don't want to go through LaTeX files inserting new syntax, set the compatibility flag to TRUE in your tex2rtf.ini file. In this mode, Tex2RTF tries to make the best of a bad job, but the results won't be optimal (e.g., no table borders). Without this flag set, normal LaTeX tables can crash RTF readers such as Word for Windows.