Contents Up Previous Next

Initialisation file syntax

The initialisation file contains further detailed options for customising Tex2RTF's behaviour. A file may be specified with the -macros command line switch, otherwise Tex2RTF looks for the file tex2rtf.ini in the working directory or input file directory.

The file may comprise macro (command) definitions or option settings.

The syntax for a macro definition is:

    \name [number of args] {...LaTeX code...}
For example:

    \crazy      [2]{{\bf #2} is crazy but #1 is not}
    \something  [0]{}
    \julian     [0]{Julian Smart}
The syntax for an option setting is:

    name = value
or

    name = "value"
For example:

    conversionMode = RTF
    runTwice = true
    titleFontSize = 12
    authorFontSize = 10
    headerRule = yes
    footerRule = yes
Options expecting boolean values accept 1, 0, true, false, yes, no in any combination of upper or lower case.

End-of-line comments are allowed in an initialisation file, using the hash, semicolon or percent signs to denote the start of a comment, which runs until the end of the line.

Tex2RTF options


Tex2RTF options

These are the allowable options in an initialisation file.


General options

compatibility Set to true for maximum LaTeX compatibility, e.g. if tables crash RTF readers. Should be false (default) if the Tex2RTF guidelines are followed, e.g. use of \row command in tabular environment.
conversionMode One of RTF, WinHelp, XLP (or wxHelp), and HTML.
ignoreInput Adds the filename to the list of files ignored by the \input command. The only default filename in the list is psbox.tex.
isInteractive If true, runs in interactive mode (the default).
runTwice If true, runs the converter twice.
ignoreBadRefs If true (or yes), ignores bad helpref references and simply writes the text in the first argument. Useful when a program such as HelpGen generates references to classes documented in another manual.


Presentation options

authorFontSize Specifies the point size for the author and date (RTF only).
chapterFontSize Specifies the point size for chapter headings (RTF only).
documentFontSize One of 10, 11 and 12, to specify the main font size independently of the LaTeX document style command.
sectionFontSize Specifies the point size for section headings (RTF only).
subsectionFontSize Specifies the point size for subsection headings (RTF only).
titleFontSize Specifies the point size for the title (RTF only).
chapterName The string used when referencing chapters. The default is "chapter".
sectionName The string used when referencing sections. The default is "section".
subsectionName The string used when referencing subsections. The default is "subsection".
subsubsectionName The string used when referencing subsubsections. The default is "subsubsection".
indexName The string used for printing the index heading. The default is "Index".
contentsName The string used for printing the contents heading. The default is "Contents".
abstractName The string used for printing the abstract heading. The default is "Abstract".
tablesName The string used for printing the list of tables heading. The default is "List of Tables".
tableName The string used when referencing a table. The default is "table".
figuresName The string used for printing the list of figures heading. The default is "List of Figures".
figureName The string used when referencing a figure. The default is "figure".
glossaryName The string used for printing the glossary heading. The default is "Glossary".
referencesName The string used for printing the references heading. The default is "References".


RTF and WinHelp options

bitmapMethod Can be "hex'' (embed the hex data in the file with a \dibitmap keyword), "includepicture'' (use the MS Word 6.0 INCLUDEPICTURE field) or "import'' (an earlier name for INCLUDEPICTURE). "hex'' may be used for importing into MS Works, but this doesn't work for Word 6.0. The default is "includepicture''.
contentsDepth The depth of headings that is displayed in the table of contents. The default is 4 but you may wish to reduce this, for example for manuals that document C++ and have a large number of headings for member functions.
defaultColumnWidth The width in points for columns in tables where the width of the column is not set by using p in the tabular argument. The default is 100.
footerRule If true, draws a rule above footers (linear RTF only).
generateHPJ If true, generates a .HPJ project file (WinHelp mode only).
headerRule If true, draws a rule below headers (linear RTF only).
listLabelIndent Specifies the size of list item label indentation, in points. The default is 18.
listItemIndent Specifies the size of list item indentation, in points. The default is 40.
indexSubsections If true (the default), subsection and subsubsection titles are indexed in RTF mode.
mirrorMargins If true, margins are mirrored in twosided documents (linear RTF only).
useWord If true (the default), Word for Windows RTF formatting is used where possibly, e.g. for the table of contents, list of tables, and list of figures.
useHeadingStyles If true (the default), sections are marked with appropriate heading styles for generating the table of contents in RTF.
useUpButton If true (the default), WinHelp files will be generated with an Up button to make browsing easier. Note that you need to put an extra line in the CONFIG section of your .HPJ file:

CreateButton("Up", "&Up", "JumpId('name.hlp', 'Contents')")

where name.hlp is the name of your help file.

winHelpContents If yes, ok or true, a WinHelp .cnt file will be generated (used in Windows 95 for either old WinHelp files or new WinHelp 4 files).
winHelpVersion The version of WinHelp being targetted. This affects the generated .hpj file and features such as transparent bitmaps which are new to version 4 or later. The default is 3.
winHelpTitle Windows Help file title, inserted into the project file if generateHPJ is true.


HTML options

htmlBrowseButtons Allows generation of Contents, Up, browse back and browse forward buttons on each HTML page except title page. Specify none, text or bitmap. If you specify bitmap, make sure that the files contents.gif, up.gif, back.gif and forward.gif are in the directory where the HTML files will reside: samples are given in the docs directory.
truncateFilenames If true, uses .htm suffix instead of .html, and truncates filenames within HTML documents.
htmlIndex If true, specifies generation of an .htx index file for an HTML document. This file can be used in wxHelp version 2 or other programs. The file consists of a number of lines, each line with three fields separated by bar characters: the indexed phrase, the file, and a label in the file.
htmlWorkshopFiles If true, specifies generation of .hpp, .hhc and .hhk files which can be used to create both MS HTML Help and wxHTML Help files. wxHTML Help is the HTML help facility that can be used by wxWidgets 2 applications (see the wxWidgets manual and the wxWidgets HTML sample).
upperCaseNames If true, filenames in links are in upper case. By default filenames are in lower case.
backgroundColour Specifies the RGB background colour for the document, e.g. 255;255;255 for white. The default is white.
backgroundImage Specifies the RGB background image for the document, e.g. tile.gif.
textColour Specifies the RGB text colour for the document, e.g. 0;0;0 for black.
linkColour Specifies the RGB link colour for the document, e.g. 0;0;255 for blue.
followedLinkColour Specifies the RGB followed link colour for the document, e.g. 0;0;255 for blue.
combineSubSections If true (or yes), switches off the generation of separate HTML files below section level. This can reduce the number of HTML files substantially. A subsection contents list is inserted before the first subsection.
htmlFaceName A string specifying the overall font face, such as ""Arial, Lucida, Helvetica".