Table of Contents

Syntax

ltx2rtf [-V] [-D] [-m] (-M] [ -o outputfile] [ -C code page] [inputfile]

Description

The ltx2rtf command converts a LaTeX file into RTF text format. The text and much of the formatting information is translated to RTF making the new file look very similar to the original. If

inputfile

is not specified, standard input is read. Unless an

outputfile

is specified the resulting RTF is produced in a file of name taken from the source with the .rtf suffix.

The \-V option prints version information on standard output and exits.

The \-D option outputs verbose debugging messages.

The \-m option LaTeX-es equations and inserts them as pictures.

The \-M option LaTeX-es equations and $ embedded maths and inserts them

as pictures.

The \-C 850 option enables reading 850-coded accented letters.

The \-C ISO option enables reading IsoLatin1-coded accented letters.

User defined LaTex commands are ignored. If you are familiar with the

RTF format and the commands can be translated by simply inserting a

format string into the RTF file you can add these commands to the direct.cfg configuration file. See format description below.

User defined LaTeX commands can be expanded using exp-macr
which is provided with the distribution.

config.cfg indicates the name/location of procedures to LaTeX equations in the %TMPDIR% directory and the convert the DVI into a PBM file.

To correctly convert font names you must edit the fonts.cfg

configuration file. You have to specify the font names you use and how the LaTeX default font names should be converted to RTF. See format description below.

LaTeX variables and user defined commands are not evaluated by ltx2rtf

itself. They will be simply ignored. To let ltx2rtf know the names of variables you can add them in the ignore.cfg file. See format description below.

The environment variable RTFPATH may contain a search path for the

support files (all files ending in .cfg). Support files are searched first in theIf no file is found during the current directory, then in

RTFPATH, then in the default directory specified in the Makefile. If the

files are not found at all the program aborts. to correctly edit the resulting file in the target word processor.

CAUTION
Please make sure that the input file is a correct LaTeX file. Use LaTeX to find and correct errors before using ltx2rtf. The conversion command does not properly handle all errors because of corrupt input files.

Make sure that the configuration files

direct.cfg, fonts.cfg, config.cfg

are in the correct directory.

direct.cfg is used for converting LaTeX commands by simple text exchange.

Write the LaTex command with backslash, followed by comma.

The rest of the line until the `.' character will be written to the RTF file

when the command is recognized in the LaTeX file.

After the `#' character everything is ignored until end of line.

To select a specific font use

*fontname*.

Make sure that the font name

fontname
is listed in the fonts configuration file at least as dummy.

To write the `*' character use **".

example:

\\alpha,{\\f*Symbol* a}. #alpha under Windows Symbol Font \\copyright,{\\ansi\\'a9\\pc}.

fonts.cfg
contains the fonts conversion table.

A line consists of a font name in LaTeX followed by comma and a font

name in RTF. The end is marked by a dot.

No spaces are allowed.

The LaTeX font will be converted to the RTF font if encountered in the

LaTeX file.

If multiple translations for a LateX font are specified,

only the first is used.

All fonts in a LaTeX file that are not in this file will be mapped to the

default font.

All RTF fonts listed in this file will be in every RTF file header whether

used or not.

After the `#' character everything is ignored till end of line.

To add a RTF font not used as substitute for a LaTeX font \- for example

a Symbol font used in

direct.cfg
\- use a dummy LaTeX name like in the following example:

Dummy3,MathematicalSymbols.

Make sure you use the correct font name. Take care of spaces in font names.

The default fonts are named Roman (command \\rm),

Sans Serif (command \\sf), Typewriter (command \\tt).

ignore.cfg is the file for defining how to ignore certain commands.

This file is used for recognition of LaTeX-variables, user defined

variables, and some simple commands. All variables are ignored but the converter must know the names to correctly ignore assignments to variables. Write the variable-name with backslash, followed by comma then write the type of the variable followed by `.'. Possible Types are:

NUMBER : simple numeric value

MEASURE : numeric value with following unit of measure

OTHER: ignores anything to the first character after `='

and from there to next space. eg. \\setbox\\bak=\\hbox

COMMAND: ignores anything to next `\\' and from there to occurence

of anything but a letter. eg. \\newbox\\bak

SINGLE: ignore single command. eg. \\noindent

Please write the type in upper case exactly as above. Do not use spaces.

After the `#' character everything is ignored till end of line.

Example:

\\pagelenght,MEASURE.

Some environments like figure are currently ignored. It would be nice to scan

the included information and convert things if possible.

The configuration files are reopened for each token, there should really

be an internal representation of the configuration files that is read once and then consulted by more efficient mechanisms.

SEE ALSO


Table of Contents