]> git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/docs/tex2rtf.tex
New way to grey out disabled toolbar icons.
[wxWidgets.git] / utils / tex2rtf / docs / tex2rtf.tex
1 \documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
2 \input{psbox.tex}
3 \newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}%
4 \newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}%
5 \newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}%
6 \newcommand{\indexit}[1]{#1\index{#1}}%
7 \newcommand{\inioption}[1]{{\bf {\tt #1}}\index{#1}}%
8 \parskip=10pt%
9 \parindent=0pt%
10 %\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only
11 \winhelpignore{\title{Manual for Tex2RTF 1.64:\\A \LaTeX\ to RTF and HTML converter}%
12 \author{Julian Smart}%
13 \date{October 1997}%
14 }%
15 \winhelponly{\title{Manual for Tex2RTF 1.64}%
16 \author{by Julian Smart\\$$\image{1cm;0cm}{tex2rtf.wmf}$$}%
17 }%
18 \makeindex%
19 \begin{document}%
20 \maketitle%
21 \pagestyle{fancyplain}%
22 \bibliographystyle{plain}%
23 \pagenumbering{roman}%
24 \setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}%
25 \setfooter{\thepage}{}{}{}{}{\thepage}%
26 \tableofcontents%
27
28 \chapter*{Copyright notice}%
29 \setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}%
30 \setfooter{\thepage}{}{}{}{}{\thepage}%
31
32 Copyright (c) 1997 Julian Smart.
33
34 Permission to use, copy, modify, and distribute this software and its
35 documentation for any purpose is hereby granted without fee, provided that the
36 above copyright notice, author statement and this permission notice appear in
37 all copies of this software and related documentation.
38
39 THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
40 IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
41 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
42
43 IN NO EVENT SHALL JULIAN SMART OR THE ARTIFICIAL INTELLIGENCE
44 APPLICATIONS INSTITUTE OR UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY
45 SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR
46 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
47 WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
48 OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
49 PERFORMANCE OF THIS SOFTWARE.
50
51 \chapter{Introduction}%
52 \pagenumbering{arabic}%
53 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
54 \setfooter{\thepage}{}{}{}{}{\thepage}%
55
56 This document describes a utility for converting \popref{\LaTeX}{latexgloss}\ files into
57 several other formats.
58
59 Only a subset of \LaTeX\ can be processed by this utility, especially
60 since the target document language will never perfectly match \LaTeX.
61 Whether the quality of the results is good enough will depend upon the
62 application and your own expectations. {\it This caveat is worth emphasizing}, because
63 many people assume that any old \LaTeX\ document will go through without modification: it might,
64 but the chances are you'll need to modify it a bit for Tex2RTF. Tex2RTF was written with
65 portable document maintenance and generation in mind, with less emphasis on accepting all \LaTeX\ syntax.
66 You have been warned!
67
68 Tex2RTF is heavily biased towards making on-line, hypertext versions of
69 \rtfsp\LaTeX\ documents, but the \popref{RTF}{rtf} converter can be used to generate linear,
70 paper-based documents too.
71
72 The latest version of Tex2RTF, plus source code, can be accessedfrom:
73
74 \begin{verbatim}
75 http://web.ukonline.co.uk/julian.smart/tex2rtf
76 ftp://www.remstar.com/pub/wxwin/tex2rtf
77 \end{verbatim}
78
79 It is available in Sun Open Look, Motif, Windows 3.1, Windows 95/NT, and
80 non-GUI UNIX versions.
81
82 Tex2RTF was developed using the free Open Look, Motif and Windows 3.1
83 C++ class library \popref{wxWindows}{wxwindows}.
84
85 \section{Status of Tex2RTF}\index{status of Tex2RTF}%
86
87 Tex2RTF is under continual development, often following users'
88 suggestions. From version 1.33, Tex2RTF is effectively in a second phase
89 of development. In addition to the bare minimum of syntax and facilities
90 for producing useable help systems or linear RTF, commands are being
91 added to allow visually effective, even aesthetically pleasing,
92 documentation to be produced.
93
94 Examples are the \verb$\indented$, \verb$\twocollist$ and \verb$\marginpar$\rtfsp
95 commands; over time I hope to be able to reproduce most of the popular
96 styles of formatting and presentation in Windows Help files, whilst
97 allowing a reasonable equivalent to be generated in the other formats.
98
99 Some new developments in the various formats still need to be catered
100 for by Tex2RTF, such as Windows 95 help files and HTML 3.0. Features
101 that can be added to Tex2RTF as a result of these developments include
102 math and inline image map support in HTML, table support in Windows
103 Help, and generally better formatting abilities in both. However, documentation
104 about these formats is sketchy at the time of writing (October 1995).
105
106 \section{Acknowledgements}\index{acknowledgements}%
107
108 Thanks are due to the many people in AIAI and on the Internet at large
109 who have pointed out bugs or shortcomings in Tex2RTF. Michel Lavaud has been
110 a great help in giving advice for improvements to the manual.
111
112 \section{Change log}\index{change log}%
113
114 Version 1.64, October 20th 1998
115
116 \begin{itemize}\itemsep=0pt
117 \item Added \verb$\insertatlevel$ command.
118 \end{itemize}
119
120 Version 1.63, October 21st 1997
121
122 \begin{itemize}\itemsep=0pt
123 \item Debugged problem with Word bookmarks not being inserted for unnumbered
124 sections.
125 \end{itemize}
126
127 Version 1.62, August 18th 1997
128
129 \begin{itemize}\itemsep=0pt
130 \item Added contributed changes by Andreas Münzenmaier to support German
131 accents by allowing the characters to be placed in input files, and also
132 converting them back to character codes in the WinHelp {\tt .cnt} file.
133 \item Now \verb$\helpref$ causes page references to be inserted in linear RTF,
134 or section references if not on Word mode.
135 \item WinHelp table caption bug fixed.
136 \end{itemize}
137
138 Version 1.61, June 11th 1997
139
140 \begin{itemize}\itemsep=0pt
141 \item \verb$\fcol$ now works in HTML using the FONT tag.
142 \item \verb$\twocollist$ works in indented paragraphs, and is now
143 implemented properly using tables in HTML.
144 \item New boolean option {\bf combineSubSections} added, which switches off
145 the generation of separate HTML files below section level. This can reduce the
146 number of HTML files substantially.
147 \end{itemize}
148
149 Version 1.60, February 18th 1997
150
151 \begin{itemize}\itemsep=0pt
152 \item The index command now allows complex LaTeX instead of inserting the
153 first argument verbatim.
154 \end{itemize}
155
156 Version 1.59, February 14th 1997
157
158 \begin{itemize}\itemsep=0pt
159 \item Added special processing for a chapter called Popups.
160 \end{itemize}
161
162 Version 1.58, August 1st 1996
163
164 \begin{itemize}\itemsep=0pt
165 \item Added HTML settings: backgroundImage, backgroundColour, textColour,
166 linkColour, followedLinkColour.
167 \item Added \verb$\backgroundimage$, \verb$\backgroundcolour$, \verb$\linkcolour$,
168 \verb$followedLinkColour$. \verb$\background$ now obsolete (but behaviour is
169 backward compatible).
170 \item The default background colour is now white.
171 \item Debugged HTML \verb$\ss$ (put in wrong place in code).
172 \end{itemize}
173
174 Version 1.57, July 27th 1996
175
176 \begin{itemize}\itemsep=0pt
177 \item Added upperCaseNames setting; now all links in HTML files are in lower
178 case unless specified otherwise.
179 \end{itemize}
180
181 Version 1.56, May 25th 1996
182
183 \begin{itemize}\itemsep=0pt
184 \item Debugged \verb$\special$ processing for HTML (escaped characters such ampersand).
185 \item Added contentsDepth for Word RTF contents page.
186 \item Removed overlapping href in HTML pages.
187 \end{itemize}
188
189 Version 1.55, May 6th 1996
190
191 \begin{itemize}\itemsep=0pt
192 \item \verb$\verb$ support corrected for HTML.
193 \item Added {\it abstractName} setting.
194 \item Debugged incorrect centring for HTML buttons.
195 \end{itemize}
196
197 Version 1.54, Feburary 28th 1996
198
199 \begin{itemize}\itemsep=0pt
200 \item Bug fix for 24-bit bitmap inclusion when generating RTF:
201 caused a floating point error.
202 \item Added htmlIndex setting, to generate an {\tt .htx} index file of an HTML document for
203 use in wxHelp version 2 or other programs.
204 \item Fixed header/footer bug.
205 \item Change colons to spaces for WinHelp RTF keywords, since the colon has a specific meaning in WinHelp.
206 \end{itemize}
207
208 Version 1.53, January 1995
209
210 \begin{itemize}\itemsep=0pt
211 \item Now stores paths from file inclusions, so that if you include
212 a file A from a separate directory, which then includes a file B
213 relative to that directory, Tex2RTF will search in the path
214 of A to find file B.
215 \end{itemize}
216
217 Version 1.52, December 1995
218
219 \begin{itemize}\itemsep=0pt
220 \item \verb$\helpref$ and related commands now generate italicized instead
221 of bold `anchor' text for linear formats.
222 \item Cured bug where Tex2RTF could hang on start up, while reading
223 the {\tt tex2rtf.ini} file. This occurred when a comment finished with
224 the end of file.
225 \item Split the commands reference in two (\LaTeX\ and Tex2RTF commands),
226 and added a {\it Commands by category} section.
227 \item Removed a bug that caused HTML output to be garbled on the
228 second pass.
229 \end{itemize}
230
231 Version 1.51: Windows 95 enhancements.
232
233 \begin{itemize}\itemsep=0pt
234 \item Added settings winHelpContents (for generating {\tt .cnt} file), winHelpVersion (for specifying
235 target version of WinHelp).
236 \item Added space to non-scrolling region of topic.
237 \item If winHelpVersion is 4, makes non-scrolling region grey and the rest yellow.
238 \item Added \verb$\settransparency$ command for WinHelp 4 transparent bitmaps.
239 \end{itemize}
240
241 Version 1.50:
242
243 \begin{itemize}\itemsep=0pt
244 \item Tidied up HTML generation (headers and bodies in the right places).
245 \item Eliminated extra space after verbatim in HTML.
246 \item Added support for simple tables in HTML.
247 \item Added \verb$\textcolour$, \verb$\background$ for colouring text and background in HTML.
248 \item Added \verb$\copyright$, \verb$\registered$ symbols in HTML.
249 \item Added \verb$\imagel$, \verb$\imager$ for left and right aligned images
250 in HTML.
251 \item Added \verb$\brclear$ for clearing image alignment in HTML.
252 \item Added \LaTeX\ font size support in HTML (\verb$\small$, \verb$\large$ etc.) using Netscape font extensions.
253 \item HTML button-bar change: always shows the same buttons, but may make one or more insensitive. Changing button positions
254 could be very annoying.
255 \item Tidied up RTF generation for non-Word viewers ({\it useWord} set to {\it false}). Will now look reasonable using
256 Windows 95 Quick View and WordPad: WordPad doesn't do tables but does bitmaps, and QuickView does tables but not
257 bitmaps. Such is life.
258 \end{itemize}
259
260 Version 1.49:
261
262 \begin{itemize}\itemsep=0pt
263 \item Cured some bugs (char used for fgetc instead of int) so now compiles for
264 WIN32s.
265 \end{itemize}
266
267 Version 1.48:
268
269 \begin{itemize}\itemsep=0pt
270 \item Added some LaTeX2e fonts commands such as \verb$\rmfamily$, \verb$\textrm$, \verb$\emph$.
271 Most of these are aliases for other commands.
272 \end{itemize}
273
274 Up to version 1.47:
275
276 \begin{itemize}\itemsep=0pt
277 \item Added \verb$\backslashraw$, \verb$\rbraceraw$ and \verb$\lbraceraw$ commands
278 to help output arbitrary RTF.
279 \item Added \verb$\sethotspotcolour$, \verb$\sethotspotunderline$ commands for controlling
280 WinHelp hotspot appearance.
281 \item Added truncateFilenames option.
282 \item Improved HTML inline image handling.
283 \end{itemize}
284
285 Up to version 1.46:
286
287 \begin{itemize}
288 \itemsep=0pt
289 \item Added \verb$\urlref$ command for specifying HTML URLs.
290 \item Started support for translating .SHG files to HTML .map files
291 (this works if compiled under Borland, not MS VC++ for some reason!)
292 \item Fixed nasty memory bug in HTML code (thanks Petr).
293 \end{itemize}
294
295 Version 1.40:
296
297 \begin{itemize}
298 \itemsep=0pt
299 \item Added {\it generateHPJ} option for generating the .HPJ WinHelp project file
300 \item Added support for DDE via a small command set
301 \end{itemize}
302
303 Version 1.39:
304
305 \begin{itemize}
306 \itemsep=0pt
307 \item Option for using Word's INCLUDEPICTURE or IMPORT field, since the method that
308 works for Works, doesn't work for Word! See {\it bitmapMethod} in the
309 settings section.
310 \end{itemize}
311
312 Version 1.37-1.38:
313
314 \begin{itemize}
315 \itemsep=0pt
316 \item Improved bibliography reading and cured some minor bugs
317 \item Added \verb$\ss$ German sharp s
318 \item Added rudimentary \verb$\special$ command (simply copies the argument
319 to the output)
320 \item Added missing '.' in subsubsection reference
321 \item Added primitive internationalisation support with contentsName, tablesName etc.
322 \end{itemize}
323
324 Version 1.36:
325
326 \begin{itemize}
327 \itemsep=0pt
328 \item All HTML special characters now correctly delimited by a semicolon.
329 \item Cured HTML section-duplicating bug I introduced in 1.35.
330 \item Cured too much spacing after sections in RTF, introduced in 1.35.
331 \end{itemize}
332
333 Version 1.35:
334
335 \begin{itemize}
336 \itemsep=0pt
337 \item Added TCHECK tool, to help track down common Tex2RTF syntax problems.
338 \item Included Kresten Thorup's LACHECK \LaTeX\ checking tool with DOS executable.
339 \item Now ignores \verb|\@| command.
340 \item Table of contents now includes numbered subsubsections.
341 \end{itemize}
342
343 Version 1.34:
344
345 \begin{itemize}
346 \itemsep=0pt
347 \item Added \verb$\multicolumn$ `support' to stop RTF readers crashing.
348 \item Added {\it useWord, defaultColumnWidth, compatibility} options to {\tt .ini} file.
349 \item \verb$\comment$ environment now doesn't complain about unknown syntax.
350 \item Added \verb$\toocomplex$ environment that treats its contents as
351 verbatim in output, treated as normal output in true \LaTeX.
352 \item End-of-line comments allowed in in {\tt .ini} files, using semicolon,
353 percent or hash characters to denote a comment.
354 \item For linear RTF, Word for Windows support for \verb$\printindex$,\rtfsp
355 \verb$\index$, \verb$\pageref$, \verb$\listoftables$, \verb$\listoffigures$, contents page.
356 \item Added RTF support for various symbols.
357 \item Added colour support, with \verb$\definecolour$, \verb$\fcol$ and \verb$\bcol$ commands.
358 \item Fixed some bugs: page numbering problems, macros deleted after first pass.
359 \end{itemize}
360
361 Version 1.33:
362
363 \begin{itemize}
364 \itemsep=0pt
365 \item Added -charset command-line switch.
366 \item Added \verb$\itemsep$, \verb$\twocolumn$, \verb$\onecolumn$, \verb$\setfooter$, \verb$\setheader$, \verb$\pagestyle$,
367 \verb$\pagenumbering$, \verb$\thechapter$, \verb$\thesection$, \verb$\thepage$, \verb$\thebibliography$, \verb$\bibitem$ commands.
368 \item New environment called \verb$\twocollist$ for making two-column lists,
369 with formatting optimized for target file format.
370 \item New \verb$\indented$ environment for controlling indentation.
371 \item List indentation and bulleting improved.
372 \item Added commands \verb$\normalbox$, \verb$\normalboxd$ for putting borders around text.
373 \item Many options can now be specified in the {\tt .ini} file along with custom macros.
374 \item Cured bug that put too much vertical space after some commands.
375 \item Improved table formatting.
376 \item Optional `Up' button in WinHelp files for easier navigation.
377 \item Verbatim lines followed by \verb$\par$ in RTF, to improve WinHelp wrapping.
378 \item Conversion may now be aborted under Windows by attempting to close the application.
379 \item Added conditional output for all formats: \verb$\latexignore$, \verb$\latexonly$, \verb$\rtfignore$, \verb$\rtfonly$,
380 \verb$\winhelpignore$, \verb$\winhelponly$, \verb$\htmlignore$, \verb$\htmlonly$, \verb$\xlpignore$, \verb$\xlponly$.
381 \item HTML generator can now add Contents, Up, $<<$ and $>>$ buttons (text or bitmap) to
382 each page except titlepage.
383 \end{itemize}
384
385 Version 1.32:
386
387 \begin{itemize}
388 \itemsep=0pt
389 \item \verb$\footnote$ command now supported in WinHelp RTF, and \verb$\footnotepopup$\rtfsp
390 added.
391 \end{itemize}
392
393 Version 1.31:
394
395 \begin{itemize}
396 \itemsep=0pt
397 \item \verb$\footnote$ command now supported, in linear RTF only.
398 \item Added {\tt -bufsize} option, for converting large documents.
399 \end{itemize}
400
401 Version 1.30:
402
403 \begin{itemize}
404 \itemsep=0pt
405 \item \verb$\image$ command now scales metafiles (but not bitmaps).
406 \item Fixed macro loading bug, now informs the user of the found macro filename.
407 \item Now supports paragraph and subparagraph commands.
408 \item Support for some accents added.
409 \item \verb$\verb$ command now supported.
410 \item Bug in subsubsection handling fixed.
411 \item Can save conversion log in a text file.
412 \end{itemize}
413
414 Version 1.22:
415
416 \begin{itemize}
417 \itemsep=0pt
418 \item More informative, warns against use of some commands.
419 \item Added compile-time support for non-GUI environments (such as plain UNIX).
420 \item Improved HTML support.
421 \end{itemize}
422
423 \chapter{Running Tex2RTF}\index{running Tex2RTF}%
424 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
425 \setfooter{\thepage}{}{}{}{}{\thepage}%
426
427 Tex2RTF may be run in a number of ways: with or without command line arguments,
428 interactively or in batch mode, and with an optional initialisation file
429 for specifying \LaTeX\ macros and detailed options.
430
431 Tex2RTF accepts two arguments (input and output filenames) and trailing
432 (optional) switches. If both filenames are given, the utility will work
433 in batch mode. Otherwise, if Tex2RTF has been compiled for GUI
434 operation, a main window will be shown, with appropriate menu items for
435 selecting input and output filenames, starting off the conversion
436 process, and so on.
437
438 Note that if the file {\tt bullet.bmp}\index{bullets} is found by Tex2RTF, this bitmap
439 will be used as the bullet for items in \verb$\itemize$ lists, for WinHelp
440 output. Otherwise, a symbol will be inserted (linear RTF) or bold `o'
441 will be used instead (all other formats).
442
443 Syntax error reporting is fairly minimal. Unrecognised macro errors may
444 actually be produced by an unbalanced brace or passing the wrong number of
445 arguments to a command, so look in the vicinity of the error for the
446 real cause.
447
448 \normalbox{Some of the syntax that is OK for true \LaTeX\ but which trips up
449 Tex2RTF, may be detected by the TCHECK\index{TCHECK} program included in the tools
450 directory of the Tex2RTF distribution. Some \LaTeX\ errors may be picked up
451 by the LACHECK\index{LACHECK} program, also found in the tools directory.}
452
453 It is recommended that you run Tex2RTF twice in order to be sure of
454 resolving all references and including an up-to-date contents page.
455
456 If importing RTF files into Word for Windows\index{Microsoft Word}, you may need to reformat
457 the document. The easiest way to do this is to select all text with
458 CTRL-A, then reformat with F9. Reformat again to ensure all references
459 are resolved. For the second format, respond with {\it Update Entire
460 Table} to prompts.
461
462 \winhelponly{
463 \section{Tex2RTF Interface}
464
465 This is the Tex2RTF interface under Windows. Click on an area of the
466 picture for more information.
467
468 $$\imagemap{1cm;0cm}{screen}{mapref}$$
469
470 \subsection{Menu bar}\label{menubar}
471
472 Use the menubar for interactive operations.
473
474 \subsection{Message area}\label{messagearea}
475
476 Tex2RTF writes warning and error messages on this window.
477
478 \subsection{Status line}\label{statusline}
479
480 Displays help on menu items as the user drags the cursor over the menus.
481
482 \subsection{Mode indicator}\label{modeindicator}
483
484 Displays the output mode Tex2RTF is currently in.
485 }
486
487 \section{Command line arguments}\index{command line arguments}%
488
489 These are the optional arguments you may give Tex2RTF on the command line.
490
491 \twocolwidtha{5cm}
492 \begin{twocollist}
493 \twocolitem{{\bf -bufsize}}{Specifies buffer size in K (default 60 under Windows,
494 500 under UNIX). Large files (particularly large verbatim environments)
495 may require a large buffer size, equal to the largest argument of a \LaTeX\ command.
496 Note that this value may not be larger than 64 under Windows.}
497 \twocolitem{{\bf -html}}{Specifies HTML (World Wide Web) output.}
498 \twocolitem{{\bf -interactive}}{Forces interactive mode even if both
499 filenames are given.}
500 \twocolitem{{\bf -charset charset}}{Specifies a character set for
501 RTF production. This can be one of ansi, mac, pc, and pca.
502 The default is ansi.}
503 \twocolitem{{\bf -macros filename}}{Specifies a file for the custom macro
504 file -- see \helpref{Macro not found error}{macronotfound}.}
505 \twocolitem{{\bf -rtf}}{Specifies linear RTF output.}
506 \twocolitem{{\bf -sync}}{Forces synchronous mode (no yielding to other
507 processes) -- usually use this in non-interactive mode.}
508 \twocolitem{{\bf -twice}}{Tells Tex2RTF to run the conversion twice to ensure all
509 references and citations are resolved and the contents page included.}
510 \twocolitem{{\bf -winhelp}}{Specifies Windows Help RTF output.}
511 \end{twocollist}
512
513 \section{Initialisation file syntax}\label{inifile}\index{initialisation file}%
514
515 The initialisation file contains further detailed options for
516 customising Tex2RTF's behaviour. A file may be specified
517 with the {\tt -macros} command line switch, otherwise Tex2RTF
518 looks for the file {\tt tex2rtf.ini} in the working directory
519 or input file directory.
520
521 The file may comprise macro\index{macros} (command) definitions or option settings.
522
523 The syntax for a macro definition is:
524
525 \begin{verbatim}
526 \name [number of args] {...LaTeX code...}
527 \end{verbatim}
528
529 For example:
530
531 \begin{verbatim}
532 \crazy [2]{{\bf #2} is crazy but #1 is not}
533 \something [0]{}
534 \julian [0]{Julian Smart}
535 \end{verbatim}
536
537 The syntax for an option setting is:
538
539 \begin{verbatim}
540 name = value
541 \end{verbatim}
542
543 or
544
545 \begin{verbatim}
546 name = "value"
547 \end{verbatim}
548
549 For example:
550
551 \begin{verbatim}
552 conversionMode = RTF
553 runTwice = true
554 titleFontSize = 12
555 authorFontSize = 10
556 headerRule = yes
557 footerRule = yes
558 \end{verbatim}
559
560 Options expecting boolean values accept {\it 1, 0, true, false, yes, no} in any combination of upper or
561 lower case.
562
563 End-of-line comments are allowed in an initialisation file, using the
564 hash, semicolon or percent signs to denote the start of a comment, which runs
565 until the end of the line.
566
567 \subsection{Tex2RTF options}\index{options in initialisation file}\index{tex2rtf.ini}\index{initialisation file}\index{macros}%
568
569 These are the allowable options in an initialisation file.
570
571 \subsubsection{General options}\label{generaloptions}
572
573 \twocolwidtha{5cm}
574 \begin{twocollist}
575 \htmlignore{\twocolitemruled{Option}{Description}}
576 \twocolitem{\inioption{compatibility}}{Set to true for maximum \LaTeX\ compatibility, e.g. if
577 tables crash RTF readers. Should be false (default) if the Tex2RTF guidelines
578 are followed, e.g. use of $\backslash${\tt row} command in tabular environment.}
579 \twocolitem{\inioption{conversionMode}}{One of RTF, WinHelp, XLP (or wxHelp), and HTML.}
580 \twocolitem{\inioption{ignoreInput}}{Adds the filename to the list of files ignored by the $\backslash${\tt input} command.
581 The only default filename in the list is {\tt psbox.tex}.}
582 \twocolitem{\inioption{isInteractive}}{If true, runs in interactive mode (the default).}
583 \twocolitem{\inioption{runTwice}}{If true, runs the converter twice.}
584 \end{twocollist}
585
586 \subsubsection{Presentation options}\index{options, presentation}%
587
588 \begin{twocollist}
589 \htmlignore{\twocolitemruled{Option}{Description}}
590 \twocolitem{\inioption{authorFontSize}}{Specifies the point size for the author and date (RTF only).}
591 \twocolitem{\inioption{chapterFontSize}}{Specifies the point size for chapter headings (RTF only).}
592 \twocolitem{\inioption{documentFontSize}}{One of 10, 11 and 12, to specify the main font size
593 independently of the \LaTeX\ document style command.}
594 \twocolitem{\inioption{sectionFontSize}}{Specifies the point size for section headings (RTF only).}
595 \twocolitem{\inioption{subsectionFontSize}}{Specifies the point size for subsection headings (RTF only).}
596 \twocolitem{\inioption{titleFontSize}}{Specifies the point size for the title (RTF only).}
597 \twocolitem{\inioption{chapterName}}{The string used when referencing chapters. The default is ``chapter".}
598 \twocolitem{\inioption{sectionName}}{The string used when referencing sections. The default is ``section".}
599 \twocolitem{\inioption{subsectionName}}{The string used when referencing subsections. The default is ``subsection".}
600 \twocolitem{\inioption{subsubsectionName}}{The string used when referencing subsubsections. The default is ``subsubsection".}
601 \twocolitem{\inioption{indexName}}{The string used for printing the index heading. The default is ``Index".}
602 \twocolitem{\inioption{contentsName}}{The string used for printing the contents heading. The default is ``Contents".}
603 \twocolitem{\inioption{abstractName}}{The string used for printing the abstract heading. The default is ``Abstract".}
604 \twocolitem{\inioption{tablesName}}{The string used for printing the list of tables heading. The default is ``List of Tables".}
605 \twocolitem{\inioption{tableName}}{The string used when referencing a table. The default is ``table".}
606 \twocolitem{\inioption{figuresName}}{The string used for printing the list of figures heading. The default is ``List of Figures".}
607 \twocolitem{\inioption{figureName}}{The string used when referencing a figure. The default is ``figure".}
608 \twocolitem{\inioption{glossaryName}}{The string used for printing the glossary heading. The default is ``Glossary".}
609 \twocolitem{\inioption{referencesName}}{The string used for printing the references heading. The default is ``References".}
610 \end{twocollist}
611
612 \subsubsection{RTF and WinHelp options}\label{rtfwinhelpoptions}\index{options, RTF}\index{RTF}%
613
614 \begin{twocollist}
615 \htmlignore{\twocolitemruled{Option}{Description}}
616 \twocolitem{\inioption{bitmapMethod}}{Can be ``hex'' (embed the hex data in the file with a $\backslash$dibitmap keyword),
617 ``includepicture'' (use the MS Word 6.0 INCLUDEPICTURE field) or ``import'' (an earlier name
618 for INCLUDEPICTURE). ``hex'' may be used for importing into MS Works, but this doesn't work
619 for Word 6.0. The default is ``includepicture''.}
620 \twocolitem{\inioption{contentsDepth}}{The depth of headings that is displayed in the table of contents. The default
621 is 4 but you may wish to reduce this, for example for manuals that document C++ and have a large number of
622 headings for member functions.}
623 \twocolitem{\inioption{defaultColumnWidth}}{The width in points for columns in tables
624 where the width of the column is not set by using {\it p} in the tabular
625 argument. The default is 100.}
626 \twocolitem{\inioption{footerRule}}{If true, draws a rule above footers (linear RTF only).}
627 \twocolitem{\inioption{generateHPJ}}{If true, generates a .HPJ project file (WinHelp mode only).}
628 \twocolitem{\inioption{headerRule}}{If true, draws a rule below headers (linear RTF only).}
629 \twocolitem{\inioption{listLabelIndent}}{Specifies the size of list item label indentation, in points.
630 The default is 18.}
631 \twocolitem{\inioption{listItemIndent}}{Specifies the size of list item indentation, in points. The default
632 is 40.}
633 \twocolitem{\inioption{indexSubsections}}{If true (the default), subsection and subsubsection
634 titles are indexed in RTF mode.}
635 \twocolitem{\inioption{mirrorMargins}}{If true, margins are mirrored in twosided documents (linear RTF only).}
636 \twocolitem{\inioption{useWord}}{If true (the default), Word for Windows RTF
637 formatting is used where possibly, e.g. for the table of contents, list of
638 tables, and list of figures.}
639 \twocolitem{\inioption{useHeadingStyles}}{If true (the default), sections are marked with
640 appropriate heading styles for generating the table of contents in RTF.}
641 \twocolitem{\inioption{useUpButton}}{If true (the default), WinHelp files will be generated with an {\bf Up}\rtfsp
642 button to make browsing easier. Note that you need to put an extra line in the CONFIG section
643 of your .HPJ file:
644
645 {\tt CreateButton("Up", "\&Up", "JumpId(`name.hlp', `Contents')")}
646
647 where {\tt name.hlp} is the name of your help file.}
648 %%% NEED TO BREAK THE LIST AT THE PAGE BREAK BECAUSE LATEX IS STUPID
649 %%% UNFORTUNATELY, Tex2RTF IS STUPIDER SO NEED TO COMMENT OUT THIS
650 %%% LINE WHEN MAKING HTML, RTF, XLP
651 %\latexonly{\end{twocollist}\newpage\begin{twocollist}}
652 \twocolitem{\inioption{winHelpContents}}{If yes, ok or true, a WinHelp {\tt .cnt} file will be generated (used in Windows 95 for either old WinHelp
653 files or new WinHelp 4 files).}
654 \twocolitem{\inioption{winHelpVersion}}{The version of WinHelp being targetted. This affects the generated {\tt .hpj} file and features
655 such as transparent bitmaps which are new to version 4 or later. The default is 3.}
656 \twocolitem{\inioption{winHelpTitle}}{Windows Help file title, inserted into the project file if {\it generateHPJ} is true.}
657 \end{twocollist}
658
659 \subsubsection{HTML options}\label{htmloptions}\index{options, HTML}\index{HTML}%
660
661 \begin{twocollist}
662 \htmlignore{\twocolitemruled{Option}{Description}}
663 \twocolitem{\inioption{htmlBrowseButtons}}{Allows generation of Contents, Up, browse back and browse forward
664 buttons on each HTML page except title page. Specify none, text or bitmap. If you specify
665 bitmap, make sure that the files {\tt contents.gif}, {\tt up.gif}, {\tt back.gif} and {\tt forward.gif} are in the
666 directory where the HTML files will reside: samples are given in the docs directory.}
667 \twocolitem{\inioption{truncateFilenames}}{If true, uses {\tt .htm} suffix instead of {\tt .html},
668 and truncates filenames within HTML documents.}
669 \twocolitem{\inioption{htmlIndex}}{If true, specifies generation of an {\tt .htx} index file for an HTML document.
670 This file can be used in wxHelp version 2 or other programs. The file consists of a number of lines,
671 each line with three fields separated by bar characters: the indexed phrase, the file, and a label in the file.}
672 \twocolitem{\inioption{upperCaseNames}}{If true, filenames in links are in upper case. By default
673 filenames are in lower case.}
674 \twocolitem{\inioption{backgroundColour}}{Specifies the RGB background colour for the document, e.g. {\tt 255;255;255} for white.
675 The default is white.}
676 \twocolitem{\inioption{backgroundImage}}{Specifies the RGB background image for the document, e.g. {\tt tile.gif}.}
677 \twocolitem{\inioption{textColour}}{Specifies the RGB text colour for the document, e.g. {\tt 0;0;0} for black.}
678 \twocolitem{\inioption{linkColour}}{Specifies the RGB link colour for the document, e.g. {\tt 0;0;255} for blue.}
679 \twocolitem{\inioption{followedLinkColour}}{Specifies the RGB followed link colour for the document, e.g. {\tt 0;0;255} for blue.}
680 \twocolitem{\inioption{combineSubSections}}{If true (or yes), switches off
681 the generation of separate HTML files below section level. This can reduce the
682 number of HTML files substantially. A subsection contents list is inserted before
683 the first subsection.}
684 \end{twocollist}
685
686 \section{DDE commands}\index{DDE}%
687
688 A Windows program can hold a conversation with Tex2RTF using DDE. The Tex2RTF server name is
689 ``TEX2RTF'', and the topic name to use is also ``TEX2RTF''.
690
691 Tex2RTF functionality is accessed using the DDE {\it Execute} message.
692 The {\it Execute} data should consist of a command name and possibly one
693 argument, e.g.
694
695 \begin{verbatim}
696 INPUT c:\docs\mine.tex
697 \end{verbatim}
698
699 If the command is not recognised, a standard TEX2RTF.INI option is assumed.
700
701 The {\it Request} DDE message can be used to query the return status of an {\it Execute}
702 command, and will be one of {\it OK} (no error), {\it CONVERSION ERROR}, or a more
703 specific error string.
704
705 The following DDE commands may be used:
706
707 \begin{twocollist}
708 \htmlignore{\twocolitemruled{Command}{Description}}
709 \twocolitem{\inioption{EXIT}}{Takes no argument, and exits Tex2RTF.}
710 \twocolitem{\inioption{GO}}{Takes no argument, and initiates the conversion.}
711 \twocolitem{\inioption{INPUT}}{Takes a file name as the argument, and sets the input file to be this name.}
712 \twocolitem{\inioption{MINIMIZE}}{Takes no argument, and minimizes Tex2RTF.}
713 \twocolitem{\inioption{OUTPUT}}{Takes a file name as the argument, and sets the input file to be this name.}
714 \twocolitem{\inioption{RESTORE}}{The same as SHOW.}
715 \twocolitem{\inioption{SHOW}}{Takes no argument, and unminimizes Tex2RTF.}
716 \end{twocollist}
717
718 \section{Performance issues}\index{performance}%
719
720 Since Tex2RTF reads the whole file into memory, a lot of memory is needed.
721 For very large documents, 16MB of RAM is adviseable.
722
723 I tested conversion of the wxWindows 1.63 manual on both VC++ 1.5 and
724 Watcom WIN32s versions of Tex2RTF, both running under Windows 3.11 on a
725 Gateway P60 with 16MB of RAM and a 2MB disk cache. Two passes were
726 made, with 1.5MB of WinHelp RTF being generated. The unoptimized 16-bit
727 version took 169 seconds. The optimized WIN32s version took 126 seconds,
728 a significant improvement. Systems with faster disk subsystems should see
729 an even better relative performance of the 32-bit version.
730
731 \chapter{Writing documents with Tex2RTF}\index{LaTeX}%
732 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
733 \setfooter{\thepage}{}{}{}{}{\thepage}%
734
735 \section{Why use \LaTeX?}
736
737 \LaTeX\ happens to be a very convenient format if you need to produce
738 documents (such as manuals, help facilities, up-to-date information) in
739 both printed and on-line media. Being a language rather than a WYSIWYG system,
740 it allows explicit specification of layout and document structure, lending
741 itself well to hypertext applications and automatic document generation.
742 Many people also prefer to use \LaTeX\ for ordinary use since it encourages
743 a logical document structure and the user is not distracted by having to perfect
744 the appearance; many layout decisions are taken by \LaTeX\ automatically.
745
746 Although \LaTeX\ is not as fancy as modern word processors and desk-top
747 publishing packages, it is for many purposes quite adequate, and sometimes
748 more flexible than its modern counterparts.
749
750 The conversion utility gives \LaTeX\ a new lease of life by allowing
751 virtually all other wordprocessor formats to be generated from documents
752 containing a reasonable subset of \LaTeX\ syntax. From the same \LaTeX\
753 sources, we can now generate printed manuals, Windows Help files, \popref{wxHelp}{wxhelp}\rtfsp
754 files, RTF-compatible word processor formats such as MS Word, and \popref{HTML}{html}\rtfsp
755 files for use in the World Wide Web. Since the conversion tool is
756 free, as are \LaTeX, HTML viewers, wxHelp and (effectively) Windows
757 Help, there are no financial or time penalties for providing
758 documentation in a wide range of printed and hypertext formats.
759
760 \section{Help versus the printed page}\index{on-line help}%
761
762 The purist may argue, quite rightly, that on-line help systems and
763 printed manuals have different characteristics; help windows tend to be
764 much smaller than pages, help topics should be more stand-alone than
765 pages in a manual, navigation methods are very different, etc. Therefore,
766 help systems should be {\it based} on printed documentation but
767 separately hand-crafted into hypertext help, preferably by an
768 independent person or team.
769
770 This might be the ideal, but many organisations or individuals simply
771 do not have the time: on-line help wouldn't get done if the
772 documentation effort had to be doubled. However, Tex2RTF does provide
773 some commands to allow tailoring the documentation to printed or
774 on-line form, such as \verb$\helponly$ and \verb$\helpignore$. An awareness
775 of the design issues should go a long way to making the compromise
776 a good one, so a book such as {\it Developing On-line Help for Windows} \cite{helpbook} is highly recommended.
777
778 \section{Output Formats}\index{output formats}%
779
780 At present the following output formats are supported:
781
782 \begin{itemize}
783 \itemsep=0pt
784 \item RTF (Rich Text Format)\index{RTF}. This is the most well developed
785 converter. RTF is commonly used as a document exchange format amongst
786 Windows-based applications, and is the input for the Windows Help
787 Compiler. Tex2RTF supports both linear documents and Windows Help
788 hypertext format.
789 \item HTML (Hypertext Markup Language)\index{HTML}. This an SGML-based format
790 commonly used by documents in the World Wide Web distributed hypertext
791 system, and formats text dynamically rather like Windows Help.
792 \item wxHelp\index{wxHelp}. This is the platform-independent help system for
793 the class library wxWindows (see the wxWindows User Manual \cite{smart93a}).
794 It can display ASCII files with embedded codes
795 for changing font styles, but no formatting is done by wxHelp.
796 \end{itemize}
797
798 \section{What compromises must I make?}\index{compromises}\index{LaTeX}%
799
800 As a \LaTeX\ user, you need to be aware that some commands or facilities
801 don't transfer to other formats, either because they are not supported
802 by the target format or because the converter does not support them.
803 Maths formatting is a good example of an unsupported feature.
804
805 Sometimes \LaTeX\ facilities must be accessed in a slightly different
806 way to support the variety of formats, particularly hypertext formats
807 where \LaTeX\ references are often replaced by hypertext jumps (but must
808 still look right in printed documentation). Tables don't transfer well
809 to RTF and HTML (and not at all to wxHelp) but an attempt is made
810 to approximate tables so long as special row commands are used, instead
811 of the usual end of row delimiter.
812
813 Bibliographies are handled quite well since the utilities can read in\rtfsp
814 {\tt .bib} files and resolve citations. Numbers are used in citations;
815 the references are not yet sorted alphabetically.
816
817 Pictures\index{pictures} are handled in a limited way: if the PSBOX\index{PSBOX} macro package is
818 used, an \verb$\image$ command can be used to place Encapsulated PostScript
819 files in \LaTeX, and Windows RGB-encoded bitmap files or placeable
820 metafiles when converting to RTF.
821
822 Nested file inclusion\index{file inclusion} is handled with \verb$\input$, \verb$\include$ and \verb$\verbatiminput$,
823 and the comment environment is supported. However, using \verb$\input$\rtfsp
824 to include macro packages is not advisable. If you do this,
825 make sure you add a line in the Tex2RTF initialisation file to ignore
826 this file, unless it's a simple \LaTeX\ file that conforms to Tex2RTF
827 restrictions. The file {\tt psbox.tex} is the only file ignored
828 by Tex2RTF by default.
829
830 Because of the way \LaTeX\ is parsed, some syntax\index{syntax restrictions} has to conform to a
831 few simple rules. Commands such as \verb$\bf$ and \verb$\it$ need to occur
832 immediately after a left brace, and have a block of their own, since
833 the text within their scope is regarded as its argument. This syntax
834 means the same thing as using \verb$\begin ... \end$, which is usually
835 a one argument command (the argument is the text between the \verb$\begin$\rtfsp
836 and \verb$\end$). See \helpref{Space}{space}.
837
838 As a Windows hypertext help writer\index{on-line help}, you don't have access to all RTF
839 commands but you'll be able to get most of what you want. In particular,
840 any \LaTeX\ document you write will automatically be a hypertext
841 document, because the converter takes advantage of the hierarchy of
842 sections. Further jumps can be placed using the commands
843 \rtfsp\commandrefn{label}{label}, \commandrefn{helpref}{helpref},
844 \rtfsp\commandrefn{helprefn}{helprefn}, and \commandrefn{popref}{popref}.
845 Tex2RTF outputs help files that may be read linearly using the
846 \rtfsp$<<$ and $>>$ buttons, and an additonal Up button for
847 ease of navigation.
848
849 When writing HTML, multiple files are generated from one \LaTeX\ file
850 since browsing HTML works best with many small files rather than a few
851 large ones.
852
853 wxHelp files are least well supported since there is no formatting
854 support, only font style, sizes and colours. Still, some hypertext help
855 support on UNIX/X platforms is better than none. wxHelp is now being rewritten (March 1996)
856 to use HTML files.
857
858 Sometimes you will use a local macro package that is unrecognised by
859 the converters. In this case, you may define a custom macro file
860 where macros are defined in terms of supported \LaTeX\ commands
861 and text. Even if the result is not the same as in \LaTeX, you
862 can probably end up with something adequate, and at least avoid
863 undefined macro errors. See \helpref{Initialisation file syntax}{inifile} for
864 further information.
865
866 \section{Changes to LaTeX syntax}
867
868 Here are the conventions you need to observe to satisfy the Tex2RTF
869 parser.
870
871 \subsection{Space}\label{space}\index{space}%
872
873 Tex2RTF attempts to insert spaces where \LaTeX\ assumes whitespace.
874 However, for the benefit of RTF conversion, you need to use the \commandrefn{rtfsp}{rtfsp} command
875 where a command or brace within a paragraph begins or ends with a macro. For example:
876
877 \begin{verbatim}
878 Within a paragraph, you need to be careful about commands
879 \rtfsp{\it that begin at the start of a line.}
880 \end{verbatim}
881
882 As normal with \LaTeX, two newlines represents a paragraph break,
883 although \commandrefn{par}{par} can also be used at the end of a paragraph.
884
885 You need to have a blank line between section and some environment
886 commands and the first paragraph or your document will look rather
887 weird, e.g. headings running into paragraphs.
888
889 wxHelp is more fussy than \LaTeX\ or RTF: you need to use percent
890 characters at line ends liberally to eliminate newlines after commands
891 on single lines.
892
893 \subsection{Command arguments}\index{LaTeX commands}%
894
895 Commands that have one or more arguments can be used in the following
896 three ways:
897
898 \begin{verbatim}
899 \bf{Some text.}
900
901 \begin{bf}
902 Some text.
903 \end{bf}
904
905 {\bf Some text.}
906 \end{verbatim}
907
908 The first method is a normal \LaTeX\ command.
909
910 The second method is called an {\it environment}; \LaTeX\ has specific
911 environments that do not always correspond to normal commands, but
912 Tex2RTF recognizes environments and normal commands interchangeably, so
913 long as the command has no more than two arguments.
914
915 With the third method, it is important that the command has its own
916 pair of braces, and that the command immediately follows the first brace.
917 Otherwise, the parser cannot parse the argument(s) properly.
918 With multiple arguments, each should be enclosed in braces.
919
920 Optional arguments are specified using square brackets or parentheses.
921
922 The braces that start command arguments must not be seperated from
923 the other arguments by whitespace. For example, the following produces
924 an error:
925
926 \begin{verbatim}
927 \image{5cm;0cm}
928 {picture.eps}
929 \end{verbatim}
930
931 and should be replaced by
932
933 \begin{verbatim}
934 \image{5cm;0cm}{picture.eps}
935 \end{verbatim}
936
937 \subsection{Avoid the setlength command}
938
939 Using the $\backslash$setlength command doesn't work, since its first
940 argument looks like a command with the wrong number of arguments. Use an
941 alternative form instead, e.g.
942
943 \begin{verbatim}
944 \parindent 0pt
945 \end{verbatim}
946
947 instead of
948
949 \begin{verbatim}
950 \setlength{\parindent}{0pt}
951 \end{verbatim}
952
953 \subsection{Units}\index{units}%
954
955 Only a subset of \LaTeX\ units may be used for specifying dimensions.
956 Valid units are {\tt pt, mm, cm} and {\tt in}. Units should usually
957 be specified for dimensions or the results may be unexpected.
958
959 \subsection{Labels}\index{labels}%
960
961 The \verb$\label$ command may be used for sections and figure captions,
962 but must come immediately after the section or caption commands with no
963 intervening whitespace.
964
965 \subsection{Tables}\label{tables}\index{tables}%
966
967 For best layout, table rows should be enclosed in a \verb$\row$\rtfsp
968 or \verb$\ruledrow$ command, since Tex2RTF can't cope with parsing
969 the \LaTeX\ tabular syntax unaided. However, if you really don't want
970 to go through \LaTeX\ files inserting new syntax, set the {\it compatibility}\rtfsp
971 flag to TRUE in your {\tt tex2rtf.ini} file. In this mode, Tex2RTF tries to make
972 the best of a bad job, but the results won't be optimal (e.g., no table
973 borders). Without this flag set, normal \LaTeX\ tables can crash RTF readers
974 such as Word for Windows.
975
976 \section{Tex2RTF for non-LaTeX users}\index{LaTeX}%
977
978 You don't need to have \LaTeX\ installed to use Tex2RTF. You
979 can still output RTF files to be imported into your favourite
980 word processor, and hypertext files for on-line help.
981
982 This chapter gives a very brief introduction to \LaTeX. For further
983 information, Kopka and Daly's {\it A Guide to \LaTeX} \cite{kopka} is
984 recommended.
985
986 \subsection{What is \LaTeX?}
987
988 \LaTeX\ is a macro package built on top of the typesetting package,
989 \TeX. \TeX\ was written by Donald Knuth in the 1970s, and Leslie
990 Lamport wrote \LaTeX\ as a higher-level, easier way to write \TeX.
991
992 \TeX\ was quite advanced for its day, and is still used (particularly by
993 academics) because of its free availability and its flexibility in
994 typesetting maths and other symbols. It's more like a programming
995 language than a word processor, with embedded commands prefixed by a
996 backslash and block structure. Like programs, \TeX\ documents are
997 processed by a `compiler', outputting a .dvi file, which is a device
998 independent file which can be read by many converters for output
999 onto physical devices, such as screens and printers.
1000
1001 A reason for its longevity is the ability to add facilities to
1002 \TeX, using macro packages that define new commands.
1003
1004 \LaTeX\ is the most popular way to write \TeX. Although WYSIWYG
1005 word processors and DTP packages are outstripping \LaTeX, the increasing
1006 interest in hypertext and mark-up languages makes \LaTeX\ relevant as
1007 a similar language to SGML documents (such as World Wide Web HTML files).
1008
1009 Also, languages such as \LaTeX\ (and Rich Text Format, which it resembles
1010 in many ways) are {\it complementary} to WYSIWYG packages. These languages
1011 allow automatic production and translation of documents, where manual
1012 mark-up is impractical or undesirable.
1013
1014 Since the source code of \TeX\ and \LaTeX\ is in the public domain,
1015 there are many free and commercial implementations of \LaTeX\ for almost
1016 every computer in existance. Of PC implementations, EmTeX is arguably
1017 the best and most complete. You can download it from various FTP sites.
1018
1019 If you don't want to use \LaTeX\ itself, you may wish to use a program
1020 called lacheck to check your documents before using Tex2RTF, since it
1021 catches some mistakes that Tex2RTF doesn't.
1022
1023 \subsection{Document structure}
1024
1025 Here is a sample of a typical \LaTeX\ document:
1026
1027 \begin{verbatim}
1028 \documentstyle[a4,texhelp]{report}
1029 \title{A title}
1030 \author{Julian Smart}
1031 \date{October 1993}
1032 \begin{document}
1033 \maketitle
1034
1035 \chapter{Introduction}
1036
1037 ...
1038
1039 \section{A section}
1040
1041 ...
1042
1043 \end{document}
1044 \end{verbatim}
1045
1046 The first line is always a \verb$\documentstyle$ command. The square brackets
1047 enclose optional {\it style} files (suffix {\tt .sty}) that alter the appearance
1048 of the document or provide new commands, and the curly brackets enclose
1049 the mandatory style, in this case `report'.
1050
1051 Before the document begins properly with \verb$\begin{document}$,
1052 you can write various commands that have an effect on the appearance of the
1053 document or define title page information. The \verb$\maketitle$ command
1054 writes the title page using information defined previously (title, author,
1055 date).
1056
1057 A report has chapters, which are divided into sections, and can be further
1058 divided into subsections and subsubsections. To start a new section, you
1059 write the appropriate section command with the section heading; there is
1060 no specific end section command, since a new section heading or the end
1061 of the document will indicate the end of the previous section.
1062
1063 An article is divided into sections, subsections and subsubsections, but
1064 has no chapters. This is so an article can be included in a report as a chapter.
1065
1066 Tex2RTF is written to deal with reports best, so stick with the report
1067 style if you can.
1068
1069 \subsection{Command syntax}
1070
1071 There are several kinds of commands in \LaTeX. Most involve a keyword
1072 prefixed with a backslash. Here are some examples:
1073
1074 \begin{verbatim}
1075 \titlepage
1076
1077 \centerline{This is a centred line}
1078
1079 \begin{center}
1080 This is a centred
1081 paragraph
1082 \end{center}
1083
1084 {\bf This is bold font}
1085 \end{verbatim}
1086
1087 The first example has no arguments. The second has one argument. The third
1088 example is an {\it environment} which uses the begin and end keywords instead
1089 of a pair of braces to enclose an argument (usually one). The fourth is an example
1090 of using a command within a pair of braces: the command applies to the scope within
1091 the braces. Tex2RTF treats this form as if it were a command with one argument,
1092 with the right brace delimiting the argument. In this case, the command must
1093 immediately follow a left brace as shown.
1094
1095 Commands may be nested, but not overlapped.
1096
1097 \subsection{Space}\index{space}%
1098
1099 In \LaTeX, white space is mostly ignored, line breaks make no difference.
1100 However, \LaTeX\ interprets two successive newlines (a blank line) as
1101 denoting a paragraph break. You may also use the \verb$\par$ command to end
1102 a paragraph.
1103
1104 \section{Hypertext features}\index{hypertext}%
1105
1106 \LaTeX\ is inherently suitable for specifying hypertext documents since
1107 it encourages description of the logical structure of a document using
1108 section commands. Therefore, a \LaTeX\ document is automatically
1109 a hypertext document, without any further editing.
1110
1111 For Windows Help, a single RTF file is generated with topics
1112 corresponding to sections. A top level contents page shows each chapter
1113 or top-level section, and each chapter or section ends with a list of
1114 further sections or subsections. Tex2RTF outputs help files that may be
1115 read linearly using the \rtfsp$<<$ and $>>$ buttons.
1116
1117 Similarly, a single wxHelp XLP file is generated.
1118
1119 For HTML, a different file is generated for each section, since the
1120 XMOSAIC browser works best with a large number of small files. The files
1121 are named automatically based on the name of the output file, with the
1122 contents page filename being formed from the output filename with {\tt
1123 \_contents} appended to the name. If the truncateFilenames option is
1124 begin used, then the contents page is just the root name, with a .htm
1125 suffix. The conversion may result in the generation of several hundred
1126 files for a large \LaTeX\ input file.
1127
1128 To specify explicit jumps around a hypertext file, the \commandrefn{helpref}{helpref} command is
1129 used. The first argument is the text to be displayed at the point of reference,
1130 which will be highlighted in a hypertext file to allow jumping to a reference.
1131 The second argument is the reference label (there should be a corresponding
1132 \rtfsp\commandrefn{label}{label} command in the file, following a section or figure).
1133
1134 To use extra Tex2RTF features in proper \LaTeX, such as \verb$\helpref$\rtfsp
1135 and the C++ and CLIPS class reference documentation features, include
1136 the style file {\tt texhelp.sty}.
1137
1138 \section{Special sections}\index{special sections}%
1139
1140 The treatment of bibliography, glossary and index are worth special mention.
1141
1142 \subsection{Bibliography}\label{bibsection}\index{bibliography}%
1143
1144 Tex2RTF recognises standard \LaTeX\ bibliography files (usually with {\tt .bib} extension)
1145 and resolves citations. The \commandrefn{bibliography}{bibliographycmd}\rtfsp
1146 command reads the given {\tt .bib} file and includes a list of
1147 references at that point in the input. Only numbered, unsorted
1148 references are catered for at the moment, with no variation in
1149 bibliography style. A {\bf References} heading is placed in the contents
1150 section. Note that Tex2RTF must be run twice to ensure the citations are
1151 resolved properly.
1152
1153 Tex2RTF can also cope with the \verb$\thebibliography$ environment, with \rtfsp
1154 \verb$\bibitem$ commands, so long as the text following the first \verb$\bibitem$\rtfsp
1155 argument is enclosed in braces as if it were a second argument.
1156
1157 \subsection{Glossary}\label{glossarysection}\index{glossary}%
1158
1159 Glossaries are formatted according to the following scheme.
1160 The \commandrefn{helpglossary}{helpglossary} environment is used together with
1161 the \commandrefn{gloss}{gloss} command for glossary entries. In \LaTeX\ this
1162 is interpreted as a description list, and each glossary entry is an item.
1163 In on-line help, each glossary entry is a section.
1164
1165 A labelled glossary entry command may be referenced by \commandrefn{popref}{popref}\rtfsp
1166 to provide a quick popup explanation of a term.
1167
1168 \subsection{Index}\index{index}%
1169
1170 The explicit index is assumed to be redundant in on-line help, since
1171 search facilities are provided. Therefore the \verb$\printindex$ command
1172 does nothing in on-line versions. In linear RTF an index field is
1173 added, and \commandrefn{index}{index} marks words for inserting in the index.
1174
1175 In Windows Help, all section headings and C++ function names are treated
1176 as keywords. A keyword may be ambiguous, that is, refer to more than one
1177 section in the help file. This automatic indexing may not always be
1178 adequate, so the \LaTeX\ \commandrefn{index}{index} command may be used
1179 to add keywords.
1180
1181 In wxHelp, all section headings are indexed.
1182
1183 \section{Authoring HTML documents}
1184
1185 When an HTML document is generated, the suffix `\_contents' is appended
1186 to the input file root. This will be the contents page for the document.
1187 A number of further HTML files will be generated, possibly a large number
1188 for a document with a large number of sections. If you are running
1189 a 16-bit Windows version of Tex2RTF, you may wish to use
1190 the {\it truncateFilenames} option to generate DOS filenames with
1191 appropriately truncated references inside the HTML files.
1192
1193 \normalbox{Tip: to reduce the number of sections generated and make
1194 the document more linear, you could define new chapter and section
1195 commands. Alias them to the normal commands in real LaTeX (edit {\tt texhelp.sty}), and
1196 to appropriate bold/large headings (but not section commands) in
1197 the Tex2RTF initialisation file.}
1198
1199 Each HTML section file (except for the contents page) is given browse
1200 buttons, similar to a Windows Help file: Contents, Up, Down, Back, Forward.
1201 You can set {\it htmlBrowseButtons} to specify whether bitmaps or text should
1202 be used for these buttons. On a text-only browser, the buttons will show
1203 as text even if images have been specified.
1204
1205 As well as the usual jumps within a document, you can use the \commandref{urlref}{urlref} command to jump
1206 to other documents. `Advanced features' which are implemented for HTML include:
1207
1208 \begin{itemize}\itemsep=0pt
1209 \item Simple tables: \commandref{tabular}{tabular} command
1210 \item Background colour/bitmap: \commandref{backgroundcolour}{backgroundcolour} and
1211 \rtfsp\commandref{backgroundimage}{backgroundimage}
1212 \item Text colour: \commandref{textcolour}{textcolour} command
1213 \end{itemize}
1214
1215 See \helpref{HTML options}{htmloptions} for relevant initialisation file
1216 switches.
1217
1218 \section{Authoring Windows Help documents}\index{WinHelp files}%
1219
1220 To produce a Windows Help file, you need to generate a WinHelp RTF file
1221 with Tex2RTF and then invoke a Windows Help compiler (such as hc505.exe)
1222 to translate this to a .hlp file.
1223
1224 WinHelp support has split into two streams, Windows 3.1 help format
1225 and Windows 95 (WinHelp 4) format. You control this with the {\it winHelpVersion} option,
1226 setting it to 3 for Windows 3.1, and 4 for Windows 95. In the latter case,
1227 you also need the Help Compiler for Windows (hcw.exe and associated components)
1228 which are available in the WIN32 SDK and with Windows 95 compilers.
1229
1230 Tex2RTF can produce a Windows 95 {\tt .cnt} file if {\it winHelpContents}\index{CNT file} is switched
1231 on. This file is used to generate the new-style contents page, allowing
1232 hierarchical browsing of the topic contents. In fact this file can be used
1233 with ordinary Windows 3.1 files on Windows 95: so to hedge your bets,
1234 generate a Windows 3.1 help file along with {\tt .cnt} file.
1235
1236 Tex2RTF also generates (optionally) a {\tt .hpj} (Help Project) file\index{HPJ file} which is
1237 fed to the help compiler and specifies the RTF file being used amongst
1238 other things. In WinHelp 4 mode, Tex2RTF adds entries to the project
1239 to enhance the appearance of the help file. In particular, the
1240 non-scrolling (topic title) region is coloured grey, and the rest
1241 is coloured a light yellow in keeping with other Windows 95 help
1242 files.
1243
1244 \normalbox{Tip: you can maintain two versions of a help file
1245 by specifying an alternative {\tt .ini} file on the command
1246 line when invoking Tex2RTF, and compiling to a different directory.
1247 Tex2RTF instructs the help compiler to use the input file directory
1248 to find bitmaps and metafiles, so using a different output directory
1249 is not a problem. See the Tex2RTF {\tt src/makefile.dos} for an example
1250 of maintaining both formats.}
1251
1252 There is a slight wrinkle with generation of the {\tt .cnt} file:
1253 to work around a `feature' in the Windows 95 help compiler, Tex2RTF may insert
1254 extra book icons in the contents page. So your contents page
1255 may not exactly match the structure in your LaTeX file.
1256
1257 `Advanced features' which are implemented for WinHelp include:
1258
1259 \begin{itemize}\itemsep=0pt
1260 \item Transparency: \commandref{settransparency}{settransparency} command
1261 \item Colour: \commandref{definecolour}{definecolour}, \commandref{fcol}{fcol}, \commandref{bcol}{bcol} commands
1262 \item Hot spot appearance: \commandref{sethotspotcolour}{sethotspotcolour}, \commandref{sethotspotunderline}{sethotspotunderline} commands
1263 \end{itemize}
1264
1265 Tex2RTF automatically generates browse buttons for jumping to the
1266 above, previous and next topics.
1267
1268 See \helpref{RTF/WinHelp options}{rtfwinhelpoptions} for
1269 relevant initialisation file switches.
1270
1271 \section{Authoring linear RTF documents}\index{RTF}%
1272
1273 Linear RTF documents come in two main flavours. It can produce simple
1274 RTF that can be read by a wide variety of readers, such as
1275 Windows 95 WordPad, the Windows 95 viewer, and most word processors.
1276 Tex2RTF can also output MS Word compatible RTF which has special
1277 fields for contents page and index formatting, headings, and
1278 other enhancements.
1279
1280 Use the {\it useWord} initialisation file flag to switch Word mode
1281 on or off.
1282 Hypertext links (using \verb$\helpref$ and other commands) will be formatted as
1283 bold `anchor' text plus a section or figure number in parentheses.
1284
1285 In Word mode, using an index section generates a proper Word index.
1286 Similarly, a Word table of contents, list of figures, list of tables
1287 and page reference may be generated.
1288
1289 See \helpref{RTF/WinHelp options}{rtfwinhelpoptions} for
1290 relevant initialisation file switches.
1291
1292 \section{Authoring wxHelp documents}\index{wxHelp}%
1293
1294 The wxHelp (.xlp) file is the most basic kind of file that Tex2RTF
1295 can handle. Since spacing is passed through to the output, you need to
1296 format your input document appropriately, with lines of reasonable length.
1297
1298 The generated xlp file is an ASCII file that can be read directly by
1299 wxHelp, the generic wxWindows help viewer.
1300
1301 \chapter{Command reference}\index{command reference}%
1302 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
1303 \setfooter{\thepage}{}{}{}{}{\thepage}%
1304
1305 The following lists commands which are recognised by the converters. The reader
1306 can assume that commands not mentioned here are unrecognised or ignored.
1307
1308 Each command is listed with its name, the number of arguments it takes
1309 (excluding optional arguments), and a description. Note that if the
1310 command is used as an environment (using \verb$\begin$ and \verb$\end$) then
1311 the number of arguments must be either one or two. For example, the\rtfsp
1312 \verb$\tabular$ environment takes two arguments: a first argument for
1313 specifying the formatting, and the second argument for the body of the
1314 environment.
1315
1316 \begin{verbatim}
1317 \begin{tabular}{|l|l|}
1318 \row{One&Two}
1319 \row{Three&Four}
1320 \end{tabular}
1321 \end{verbatim}
1322
1323 \section{\LaTeX\ Commands}
1324
1325 \subsection*{abstract:1}\label{abstract}
1326
1327 This standard \LaTeX\ environment prepares an abstract page, and is
1328 treated as an ordinary chapter or section in on-line help.
1329
1330 \subsection*{addcontentsline:3}\label{addcontentsline}
1331
1332 Adds a chapter title to the contents page. Linear RTF. Rarely required.
1333
1334 %\subsection*{appendix}
1335 %\subsection*{arabic}
1336 %\subsection*{array}
1337 \subsection*{author:1}\label{author}
1338
1339 Defines the author, for output when \verb$\maketitle$ is used.
1340
1341 \subsection*{backslash:0}\label{backslash}
1342
1343 Outputs a backslash in math mode (should be enclosed by two dollar symbols).
1344
1345 \subsection*{bf:1}\label{bf}
1346
1347 Specifies bold font.
1348
1349 \subsection*{bffamily:1}\label{bffamily}
1350
1351 Specifies bold font.
1352
1353 \subsection*{bibitem:2}\label{bibitem}
1354
1355 For parsing convenience, \verb$\bibitem$ requires two arguments: a cite key and item.
1356 \rtfsp\LaTeX\ syntax permits writing this as if it were two arguments,
1357 even though it is in fact only one. This command is used within
1358 a \commandrefn{thebibliography}{thebibliography} environment. The preferred
1359 method is to store references in {\tt .bib} files and use the \commandrefn{bibliography}{bibliographycmd}\rtfsp
1360 command to generate a bibliography section automatically.
1361
1362 \subsection*{bibliographystyle:1}\label{bibliographystyle}
1363
1364 Currently doesn't affect the style of bibliography, but probably will
1365 in the future.
1366
1367 \subsection*{bibliography:0}\label{bibliographycmd}
1368
1369 Includes the bibliography at this point in the document. See the section
1370 on \helpref{bibliographies}{bibsection}.
1371
1372 %\subsection*{caption*}
1373 \subsection*{caption:1}\label{caption}
1374
1375 Specifies a caption (within a \commandrefn{figure}{figure} or \commandrefn{table}{table} environment). This may
1376 be followed immediately by a \commandrefn{label}{label} command.
1377
1378 \subsection*{cdots:0}\label{cdots}
1379
1380 Outputs three dots.
1381
1382 \subsection*{centerline:1}\label{centerline}
1383
1384 Centres (or centers!) a line of text.
1385
1386 %\subsection*{centering}
1387 \subsection*{center:1}\label{center}
1388
1389 Centres a block of text.
1390
1391 \subsection*{chapter:1}\label{chapter}
1392
1393 Outputs a chapter heading. If the chapter's name is Popups\index{popups}, the chapter title will not be
1394 put in the contents, to allow popups to be placed in a document without the popup
1395 sections being directly accessible.
1396
1397 \subsection*{chapter*:1}\label{chaptersX}
1398
1399 Outputs a chapter heading with no contents entry.
1400
1401 \subsection*{cite:1}\label{cite}
1402
1403 Cite a reference. The argument is a reference key as defined in a \LaTeX\ {\tt .bib}\rtfsp
1404 file.
1405
1406 \subsection*{comment:1}\label{comment}
1407
1408 An environment that allows large comments in \LaTeX\ files: the argument
1409 is ignored in all formats. Useful for commenting out parts of files that
1410 cannot be handled by \LaTeX, such as the picture environment. See also\rtfsp
1411 \commandrefn{toocomplex}{toocomplex}.
1412
1413 \subsection*{date:1}\label{date}
1414
1415 Specifies the date of a document; only output by \commandrefn{maketitle}{maketitle}.
1416
1417 \subsection*{description:1}\label{description}
1418
1419 A list environment, where each \commandrefn{item}{item} command must be
1420 followed by optional square-bracketed text which will be highlighted.
1421
1422 %\subsection*{destruct:1}\label{destruct}
1423
1424 \subsection*{document:1}\label{document}
1425
1426 This environment should enclose the body of a document.
1427
1428 \subsection*{documentstyle:1}\label{documentstyle}
1429
1430 Specifies the main style (report, article etc.) and, optionally, style files
1431 such as {\tt texhelp.sty}. A report has \commandrefn{chapters}{chapter}, while an article's top-level
1432 sections are specified using \commandrefn{section}{section}.
1433
1434 %\subsection*{doublespace}\label{doublespace}
1435 \subsection*{em:1}\label{em}
1436
1437 Emphasizes text (italic in RTF).
1438
1439 \subsection*{emph:1}\label{emph}
1440
1441 Same as \commandrefn{em}{em}.
1442
1443 \subsection*{enumerate:1}\label{enumerate}
1444
1445 Enumerate list environment: numbers the \commandrefn{items}{item}.
1446
1447 %\subsection*{equation}\label{equation}
1448 %\subsection*{evensidemargin}
1449 %\subsection*{fbox:1}\label{fbox}
1450
1451 \subsection*{figure:1}\label{figure}
1452
1453 A figure environment: does nothing special, except allows interpretation of
1454 embedded \helpref{caption}{caption} commands as figures rather than (say) tables.
1455
1456 \subsection*{flushleft:1}\label{flushleft}
1457
1458 Flushes the given text to the left margin.
1459
1460 \subsection*{flushright:1}\label{flushright}
1461
1462 Flushes the given text to the right margin.
1463
1464 %\subsection*{footheight}\label{footheight}
1465 \subsection*{footnote:1}\label{footnote}
1466
1467 In linear RTF, a footnote is created. Whether this appears at the end of
1468 the section or the bottom of the page appears to depend on the current
1469 document style, at least for MS Word 6.0 for Windows. The default seems
1470 to be to put the footnotes at the end of the section, which is probably
1471 not the best assumption.
1472
1473 In WinHelp RTF, a bracketed number is generated for the footnote
1474 and the footnote becomes a popup topic. It is probably preferable
1475 to change footnote commands to \commandref{footnotepopup}{footnotepopup},
1476 or \commandref{popref}{popref} references to glossary entries.
1477
1478 This command is not supported for formats other than \LaTeX,
1479 linear RTF and WinHelp RTF.
1480
1481 \subsection*{hline:0}\label{hline}
1482
1483 Within a \commandrefn{tabular}{tabular} environment, draws a horizontal
1484 rule below the current row. Note that this does not work in RTF for the
1485 last row of a table, in which case the command \commandrefn{ruledrow}{ruledrow}\rtfsp
1486 should be used instead.
1487
1488 \subsection*{hrule:0}\label{hrule}
1489
1490 Draws a horizontal line below the current paragraph. For example:
1491
1492 \begin{verbatim}
1493 This paragraph should have a horizontal rule following it.\hrule
1494 \end{verbatim}
1495
1496 gives:
1497
1498 This paragraph should have a horizontal rule following it.\hrule
1499
1500 %\subsection*{hspace*}\label{hspaceX}
1501 %\subsection*{hspace}\label{hspace}
1502 %\subsection*{hskip*}\label{hskipX}
1503 %\subsection*{hskip}\label{hskip}
1504
1505 \subsection*{huge:1}\label{huge1}
1506
1507 Outputs the argument in huge text.
1508
1509 \subsection*{Huge:1}\label{Huge2}
1510
1511 Outputs the argument in huger text than \commandrefn{huge}{huge1}.
1512
1513 \subsection*{HUGE:1}\label{HUGE3}
1514
1515 Outputs the argument in huger text than \commandrefn{Huge}{Huge2}.
1516
1517 \subsection*{include:1}\label{include}
1518
1519 Include the given file. The command must not be preceded by any whitespace,
1520 and spurious whitespace between elements of the command will also
1521 trip up Tex2RTF.
1522
1523 \subsection*{index:1}\label{index}
1524
1525 In WinHelp mode, adds a keyword to the keyword list for the current
1526 topic. This keyword must currently be straight text, with no embedded
1527 commands. The conversion process must be run twice (without quitting
1528 Tex2RTF inbetween) to resolve the keyword references.
1529
1530 \subsection*{input:1}\label{input}
1531
1532 Include the given file. The command must not be preceded by any whitespace,
1533 and spurious whitespace between elements of the command will also
1534 trip up Tex2RTF.
1535
1536 \subsection*{insertatlevel:2}\label{insertatlevel}
1537
1538 Insert some text at a particular level of the document. For example,
1539
1540 \begin{verbatim}
1541 \insertatlevel{2}{Some text}
1542 \end{verbatim}
1543
1544 inserts "Some text" at level 2 (for a report, the current section). This
1545 allows you to insert headings into an automatically-generated section contents,
1546 for example.
1547
1548 \subsection*{it:1}\label{it}
1549
1550 Marks the argument in italic.
1551
1552 \subsection*{itemize:1}\label{itemize}
1553
1554 Indents each \commandrefn{item}{item} of a list and precedes with a bullet.
1555 If the file {\tt bullet.bmp} is found by Tex2RTF, this bitmap will be
1556 used as the bullet (WinHelp RTF); otherwise, a symbol or bold `o' will be used instead,
1557 depending on output format.
1558
1559 Use \commandrefn{itemsep}{itemsep} to specify the separation between
1560 list items. Currently this only works for linear or WinHelp RTF output.
1561 If the value is more than zero, an extra paragraph is inserted.
1562
1563 \subsection*{item:0}\label{item}
1564
1565 Marks an item of a \commandrefn{itemize}{itemize}, \commandrefn{description}{description} or \commandrefn{enumerate}{enumerate}
1566 list. Items within a description environment should have an `optional' argument
1567 in square brackets which will be highlighted.
1568
1569 \subsection*{itemsep:0}\label{itemsep}
1570
1571 Use this command to specify the separation between
1572 list items. Currently this only works for linear or WinHelp RTF output.
1573 If the value is zero, no extra paragraph is inserted; if the value
1574 is more than zero, an extra paragraph is inserted.
1575
1576 \subsection*{itshape:1}\label{itshape}
1577
1578 Marks the argument in italic.
1579
1580 %\subsection*{kill}\label{kill}
1581 \subsection*{label:1}\label{label}
1582
1583 Labels the chapter, section, subsection, subsubsection or figure caption
1584 with the given label. This must be an ASCII string, and duplicate items
1585 with different case letters are not allowed.
1586
1587 The command must follow immediately after the section or caption command,
1588 with no intervening whitespace.
1589
1590 \subsection*{large:1}\label{large1}
1591
1592 Marks the argument in large text.
1593
1594 \subsection*{Large:1}\label{Large2}
1595
1596 Makes the argument display in larger text than \commandrefn{large}{large1}.
1597
1598 \subsection*{LARGE:1}\label{LARGE3}
1599
1600 Makes the argument display in larger text than \commandrefn{Large}{Large2}.
1601
1602 \subsection*{LaTeX:0}\label{LaTeX}
1603
1604 Outputs the annoying \LaTeX\ upper and lower case name.
1605
1606 \subsection*{ldots:0}\label{ldots}
1607
1608 Outputs three dots.
1609
1610 %\subsection*{linebreak}\label{linebreak}
1611 %\subsection*{listoffigures}\label{listoffigures}
1612 %\subsection*{listoftables}\label{listoftables}
1613 %\subsection*{makeglossary}\label{makeglossary}
1614 %\subsection*{makeindex}\label{makeindex}
1615 \subsection*{maketitle:0}\label{maketitle}
1616
1617 Makes the article or report title by outputting the \commandrefn{title}{title},
1618 \rtfsp\commandrefn{author}{author} and optionally \commandrefn{date}{date}.
1619
1620 %\subsection*{markright}\label{markright}
1621 %\subsection*{markboth}\label{markboth}
1622
1623 \subsection*{marginparwidth:1}\label{marginparwidth}
1624
1625 Specifies the width of a margin paragraph.
1626
1627 \subsection*{marginpar:1}\label{marginpar}
1628
1629 Inserts a marginal note. It is best to use the Tex2RTF extensions \rtfsp
1630 \commandrefn{marginparodd}{marginparodd} and \commandrefn{marginpareven}{marginpareven} \rtfsp
1631 for best results.
1632
1633 \subsection*{marginpareven:1}\label{marginpareven}
1634
1635 Inserts a marginal note on even pages. This is required for RTF generation since
1636 it is impossible for Tex2RTF to know in advance which side of paper the marginal note
1637 will fall upon, and the text has to be positioned using absolute dimensions.
1638 If only one sided output is required, use \commandrefn{marginparodd}{marginparodd} \rtfsp
1639 instead.
1640
1641 \subsection*{marginparodd:1}\label{marginparodd}
1642
1643 Inserts a marginal note on odd pages. This is required for RTF generation since
1644 it is impossible for Tex2RTF to know in advance which side of paper the marginal note
1645 will fall upon, and the text has to be positioned using absolute dimensions.
1646
1647 Also, even if one-sided output is required, this command should be used instead
1648 of \verb$\marginpar$ because the \LaTeX\ command allows it to be used
1649 just before a paragraph. Normally, if this were done, the marginal note would
1650 not be aligned with the paragraph succeeding it. For example:
1651
1652 \begin{verbatim}
1653 \marginparodd{{\it Note:} if nothing happens, perhaps you
1654 have not plugged your computer in at the mains.}%
1655 To start using your computer, push the Power button
1656 and wait for text to appear on the screen.
1657 \end{verbatim}
1658
1659 Note the percent sign after the \verb$\marginparodd$ command: without it,
1660 \LaTeX\ refuses to believe that the following text is part of the
1661 same paragraph, and will print the note at the wrong place.
1662
1663 You should use \commandrefn{textwidth}{textwidth} to allow space for marginal
1664 notes, and also \commandrefn{marginparwidth}{marginparwidth} to specify the size of
1665 the marginal note.
1666
1667 In WinHelp, HTML and wxHelp, marginal notes are treated as normal text delineated
1668 with horizontal rules above and below.
1669
1670 %\subsection*{mbox:1}\label{mbox}
1671
1672 \subsection*{mdseries:1}\label{mdseries}
1673
1674 Changes to a medium-weight font. Un-emboldens in RTF mode, no effect in other modes.
1675
1676 \subsection*{multicolumn:3}\label{multicolumn}
1677
1678 Used in \commandrefn{tabular}{tabular} environment to denote a cell that
1679 spans more than one column. Only supplied for compatibility with
1680 existing \LaTeX\ files, since all it does in RTF is output the correct
1681 number of cell commands, with the multicolumn text squashed into one cell.
1682
1683 \subsection*{newcommand:3}\label{newcommand}
1684
1685 Define a new command; arguments are the command, the number of
1686 arguments, and the command body. For example:
1687
1688 \begin{verbatim}
1689 \newcommand{\crazy}[2]{{\bf #1} is crazy but {\bf #2} is not.}
1690 \end{verbatim}
1691
1692 The command must have no whitespace at the start of the line or between
1693 the three arguments.
1694
1695 New commands may also be defined in the {\tt tex2rtf.ini} file using
1696 slightly different syntax (see \helpref{Macro not found error}{macronotfound}).
1697
1698 %\subsection*{newcounter}\label{newcounter}
1699 %\subsection*{newline}\label{newline}
1700 \subsection*{newpage:0}\label{newpage}
1701
1702 Inserts a page break.
1703
1704 \subsection*{nocite:1}\label{nocite}
1705
1706 Specifies that this reference should appear in the bibliography,
1707 but the citation should not appear in the text.
1708
1709 See also \commandrefn{cite}{cite}.
1710
1711 \subsection*{noindent:0}\label{noindent}
1712
1713 Sets paragraph indentation to zero. See also \commandrefn{parindent}{parindent}.
1714
1715 %\subsection*{nolinebreak}\label{nolinebreak}
1716 %\subsection*{nopagebreak}\label{nopagebreak}
1717
1718 \subsection*{normalsize:1}\label{normalsize}
1719
1720 Sets the font size back to normal.
1721
1722 \subsection*{onecolumn:0}\label{onecolumn}
1723
1724 Sets the number of columns to one. \LaTeX\ and linear RTF only.
1725
1726 %\subsection*{oddsidemargin}\label{oddsidemargin}
1727 %\subsection*{pagebreak}\label{pagebreak}
1728 \subsection*{pageref:1}\label{pageref}
1729
1730 In linear RTF, generates a page reference to the given label.
1731
1732 \subsection*{pagestyle:1}\label{pagestyle}
1733
1734 If argument is {\tt fancyplain} or {\tt fancy}, Tex2RTF
1735 separates the header from the rest of the page with a rule.
1736 This command must be defined for headers and footers to
1737 work properly. See also \commandrefn{setheader}{setheader},
1738 \commandrefn{setfooter}{setfooter}.
1739
1740 \LaTeX\ and linear RTF only.
1741
1742 \subsection*{pagenumbering:1}\label{pagenumbering}
1743
1744 The argument may be one of:
1745
1746 \begin{description}
1747 \itemsep=0pt
1748 \item[alph] a, b, ...
1749 \item[Alph] A, B, ...
1750 \item[arabic] 1, 2, ...
1751 \item[roman] i, ii, ...
1752 \item[Roman] I, II, ...
1753 \end{description}
1754
1755 \LaTeX\ and linear RTF only.
1756
1757 \subsection*{paragraph:0}\label{paragraph}
1758
1759 Behaves as for a subsubsection.
1760
1761 \subsection*{paragraph*:0}\label{paragraphX}
1762
1763 Behaves as for a subsubsection.
1764
1765 \subsection*{parindent:1}\label{parindent}
1766
1767 Indents the first line of succeeding paragraphs by the given amount.
1768
1769 \subsection*{parskip:1}\label{parskip}
1770
1771 Changes the spacing between paragraphs. In fact, in RTF this will cause
1772 two \commandrefn{par}{par} commands to be output if parskip is greater
1773 than zero.
1774
1775 %\subsection*{part*}\label{partX}
1776 %\subsection*{part}\label{part}
1777 \subsection*{par:0}\label{par}
1778
1779 Causes the paragraph to end at this point. \LaTeX\ and Tex2RTF also
1780 treat two consecutive newlines as a paragraph break.
1781
1782 %\subsection*{pfunc}\label{pfunc}
1783 %\subsection*{picture}\label{picture}
1784 \subsection*{printindex:0}\label{printindex}
1785
1786 In linear RTF, inserts an index.
1787
1788 \subsection*{quote:1}\label{quote}
1789
1790 Indents a short quotation.
1791
1792 \subsection*{quotation:1}\label{quotation}
1793
1794 Indents a long quotation.
1795
1796 %\subsection*{raggedbottom}\label{raggedbottom}
1797 %\subsection*{raggedleft}\label{raggedleft}
1798 %\subsection*{raggedright}\label{raggedright}
1799
1800 \subsection*{ref:1}\label{ref}
1801
1802 In \LaTeX\ and linear RTF, refers to a \commandrefn{label}{label} and
1803 causes the number of that section or figure to be printed.
1804
1805 \subsection*{rm:1}\label{rm}
1806
1807 Causes the argument to be formatted in a plain, roman font.
1808 In fact, does nothing in RTF, HTML and XLP modes.
1809
1810 \subsection*{rmfamily:1}\label{rmfamily}
1811
1812 Causes the argument to be formatted in a plain, roman font.
1813 In fact, does nothing in RTF, HTML and XLP modes.
1814
1815 %\subsection*{roman}\label{roman1}
1816 %\subsection*{Roman}\label{Roman2}
1817
1818 \subsection*{sc:1}\label{sc}
1819
1820 Prints the output in small capitals.
1821
1822 \subsection*{scshape:1}\label{scshape}
1823
1824 Prints the output in small capitals.
1825
1826 \subsection*{section:1}\label{section}
1827
1828 Section header, with an entry in the contents page.
1829
1830 \subsection*{section*:1}\label{sectionX}
1831
1832 Section header, with no entry in the contents page.
1833
1834 %\subsection*{setcounter}\label{setcounter}
1835 \subsection*{sf:1}\label{sf}
1836
1837 Should format in a sans-serif font. Does nothing in Tex2RTF.
1838
1839 \subsection*{sffamily:1}\label{sffamily}
1840
1841 Should format in a sans-serif font. Does nothing in Tex2RTF.
1842
1843 \subsection*{shortcite:1}\label{shortcite}
1844
1845 The same as \commandrefn{cite}{cite}.
1846
1847 %\subsection*{singlespace}\label{singlespace}
1848 %\subsection*{sloppypar}\label{sloppypar}
1849 %\subsection*{sloppy}\label{sloppy}
1850
1851 \subsection*{sl:1}\label{sl}
1852
1853 In Tex2RTF, the same as \commandrefn{it}{it}. The LaTeX interpretation is `slanted text'.
1854
1855 \subsection*{slshape:1}\label{slshape}
1856
1857 In Tex2RTF, the same as \commandrefn{itshape}{itshape}. The LaTeX interpretation is `slanted text'.
1858
1859 \subsection*{small:1}\label{small}
1860
1861 Prints the argument in a small font.
1862
1863 \subsection*{special:1}\label{special}
1864
1865 Simply copies the argument to the output file without processing
1866 (except \verb$\}$ is translated to \verb$}$, and \verb$\{$ is
1867 translated to \verb${$, to allow for insertion of braces).
1868
1869 \subsection*{ss:0}\label{ss}
1870
1871 Outputs the German sharp S character \ss.
1872
1873 %\subsection*{subitem}\label{subitem}
1874 \subsection*{subparagraph:1}\label{subparagraph}
1875
1876 Behaves as for a subsubsection.
1877
1878 \subsection*{subparagraph*:1}\label{subparagraphX}
1879
1880 Behaves as for a subsubsection.
1881
1882 \subsection*{subsection:1}\label{subsection}
1883
1884 Subsection header, with an entry in the contents page.
1885
1886 \subsection*{subsection*:1}\label{subsectionX}
1887
1888 Subsection header, with no entry in the contents page.
1889
1890 \subsection*{subsubsection:1}\label{subsubsection}
1891
1892 Subsubsection header, with an entry in the contents page.
1893
1894 \subsection*{subsubsection*:1}\label{subsubsectionX}
1895
1896 Subsubsection header, with no entry in the contents page.
1897
1898 \subsection*{tabbing:1}\label{tabbing}
1899
1900 Tabbing environment: doesn't work properly in RTF.
1901
1902 \subsection*{table:1}\label{table}
1903
1904 An environment for tables. The only thing that Tex2RTF does with this
1905 is to interpret an embedded \helpref{caption}{caption} command differently
1906 from figures.
1907
1908 \subsection*{tableofcontents:0}\label{tableofcontents}
1909
1910 Inserts the table of contents at this point. In linear RTF mode, a
1911 proper Word for Windows table of contents will be inserted unless either
1912 of the variables {\it insertTOC} or {\it useWord} is set to {\it false}.
1913
1914 \subsection*{tabular:2}\label{tabular}
1915
1916 Tabular environment: an attempt is made to output something
1917 reasonable in RTF and HTML formats, although currently only simple
1918 tables will work. The first argument specifies the column formatting.
1919 a pipe symbol (\verb$|$) denotes a vertical border, one of {\tt l, r, c}\rtfsp
1920 signifies a normal column of default width, and {\tt p} followed by
1921 a dimension specifies a column of given width. It is recommended that
1922 the {\tt p} is used since Tex2RTF cannot deduce a column width in the
1923 same way that \LaTeX\ can.
1924
1925 Horizontal rules are achieved with \commandrefn{hline}{hline}; two together
1926 signify a double rule. Note that in HTML, all rows and the table itself are bordered
1927 automatically.
1928
1929 Use the Tex2RTF \commandrefn{row}{row} and \commandrefn{ruledrow}{ruledrow} commands
1930 for best effect.
1931
1932 For two-column tables that work in WinHelp files, use \commandrefn{twocollist}{twocollist} instead.
1933
1934 Example:
1935
1936 \begin{verbatim}
1937 \begin{tabular}{|l|p{8.5cm}|}\hline
1938 \row{{\bf A.I.}&{\bf Simulation}}\hline\hline
1939 \row{rules&constraints/methods}
1940 \row{planning&design of experiments}
1941 \row{diagnosis&analysis of results}
1942 \ruledrow{learning&detection of connections}
1943 \end{tabular}
1944 \end{verbatim}
1945
1946 This produces:
1947
1948 \begin{tabular}{|l|p{8.5cm}|}\hline
1949 \row{{\bf A.I.}&{\bf Simulation}}\hline\hline
1950 \row{rules&constraints/methods}
1951 \row{planning&design of experiments}
1952 \row{diagnosis&analysis of results}
1953 \ruledrow{learning&detection of connections}
1954 \end{tabular}
1955
1956 %\subsection*{tab:1}\label{tab}
1957 \subsection*{TeX:0}\label{TeX}
1958
1959 Outputs the annoying \TeX\ upper and lower case name.
1960
1961 \subsection*{textbf:1}\label{textbf}
1962
1963 Same as \commandrefn{bf}{bf}.
1964
1965 \subsection*{textit:1}\label{textit}
1966
1967 Same as \commandrefn{it}{it}.
1968
1969 \subsection*{textrm:1}\label{textrm}
1970
1971 Same as \commandrefn{rm}{rm}.
1972
1973 \subsection*{textsf:1}\label{textsf}
1974
1975 Same as \commandrefn{sf}{sf}.
1976
1977 \subsection*{textsc:1}\label{textsc}
1978
1979 Same as \commandrefn{sc}{sc}.
1980
1981 \subsection*{textsl:1}\label{textsl}
1982
1983 Same as \commandrefn{sl}{sl}.
1984
1985 \subsection*{texttt:1}\label{texttt}
1986
1987 Same as \commandrefn{tt}{tt}.
1988
1989
1990 \subsection*{textwidth:1}\label{textwidth}
1991
1992 Sets the text width (valid for RTF only). This might be used
1993 in conjunction with \commandrefn{marginpar}{marginpar}, for example,
1994 to leave space for marginal notes.
1995
1996 %\subsection*{textheight}\label{textheight}
1997 \subsection*{thebibliography:1}\label{thebibliography}
1998
1999 An environment for specifying the bibliography as a series of\rtfsp
2000 \commandrefn{bibitem}{bibitem} commands; the preferred method is to use
2001 \rtfsp{\tt .bib} files and \commandrefn{bibliography}{bibliographycmd} instead.
2002
2003 %\subsection*{titlepage:0}\label{titlepage}
2004
2005 \subsection*{title:1}\label{title}
2006
2007 Sets the title, to be output when the command \commandrefn{maketitle}{maketitle}\rtfsp
2008 is used.
2009
2010 \subsection*{tiny:1}\label{tiny}
2011
2012 Prints the argument in a very small font.
2013
2014 \subsection*{today:0}\label{today}
2015
2016 Outputs today's date.
2017
2018 %\subsection*{topmargin}\label{topmargin}
2019 %\subsection*{topskip}\label{topskip}
2020 \subsection*{tt:1}\label{tt}
2021
2022 Outputs the argument in teletype font.
2023
2024 \subsection*{ttfamily:1}\label{ttfamily}
2025
2026 Outputs the argument in teletype font.
2027
2028 %\subsection*{typein}\label{typein}
2029 \subsection*{typeout:1}\label{typeout}
2030
2031 Outputs the text on the Tex2RTF text window.
2032
2033 \subsection*{twocolumn:0}\label{twocolumn}
2034
2035 Sets the number of columns to two. \LaTeX\ and linear RTF only.
2036
2037 \subsection*{underline:1}\label{underline}
2038
2039 Underlines the argument.
2040
2041 \subsection*{upshape:1}\label{upshape}
2042
2043 Changes to an upright font. Un-italicizes in RTF mode, no effect in other modes.
2044
2045 \subsection*{verbatiminput:1}\label{verbatiminput}
2046
2047 Include the given file as if it were within a \commandrefn{verbatim}{verbatim}\rtfsp
2048 environment. The command must not be preceded by any whitespace,
2049 and spurious whitespace between elements of the command will also
2050 trip up Tex2RTF.
2051
2052 \subsection*{verbatim:1}\label{verbatim}
2053
2054 Uses a fixed-width font to format the argument without interpreting
2055 any \LaTeX\ commands.
2056
2057 \subsection*{verb}\label{verb}
2058
2059 The \verb$\verb$ command is like the \commandref{verbatim}{verbatim} environment,
2060 but for small amounts of text. The syntax is:
2061
2062 \begin{verbatim}
2063 \verb<char><text><char>
2064 \end{verbatim}
2065
2066 The character {\it char} is used as a delimiter; it may be any character
2067 not ocurring in the following text, except asterisk.
2068
2069 For example, \verb@\verb$\thing%^&$@ produces \verb$\thing%^&$.
2070
2071 %\subsection*{verse}\label{verse}
2072 %\subsection*{vfill}\label{vfill}
2073 %\subsection*{vline}\label{vline}
2074 %\subsection*{void}\label{void}
2075 %\subsection*{vrule}\label{vrule}
2076 %\subsection*{vspace*}\label{vspaceX}
2077 %\subsection*{vskip*}\label{vskipX}
2078 %\subsection*{vspace}\label{vspace}
2079 %\subsection*{vskip}\label{vskip}
2080
2081
2082 \section{Tex2RTF Commands}
2083
2084 \subsection*{backgroundcolour:1}\label{backgroundcolour}
2085
2086 Specifies the page background colour, in HTML only. The argument consists
2087 of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
2088
2089 \begin{verbatim}
2090 \backgroundcolour{255;255;255}
2091 \backgroundcolour{0;0;255}
2092 \end{verbatim}
2093
2094 The first example sets the background to white, the second sets the background to blue.
2095
2096 Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
2097 setting, {\it backgroundColour}.
2098
2099 \subsection*{backgroundimage:1}\label{backgroundimage}
2100
2101 Specifies the page background image, in HTML only. The argument
2102 is a URL for the GIF file to be used as the background.
2103
2104 For example:
2105
2106 \begin{verbatim}
2107 \backgroundimage{tile.gif}
2108 \end{verbatim}
2109
2110 This sets the background to a tile file.
2111
2112 Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
2113 setting, {\it backgroundImage}.
2114
2115 \subsection*{backslashraw:0}\label{backslashraw}
2116
2117 Outputs a raw backslash into the output (not LaTeX). Useful when
2118 inserting RTF (for example) that cannot be dealt with by Tex2RTF.
2119 E.g.
2120
2121 \begin{verbatim}
2122 \backslashraw{'e3}
2123 \end{verbatim}
2124
2125 inserts the text \verb$\'e3$ into the RTF file.
2126
2127 \subsection*{bcol:2}\label{bcol}
2128
2129 Sets the background colour for a block of text (RTF only). Has no known effect
2130 in the RTF readers currently tried (Word for Window and Windows Help).
2131
2132 See also \commandrefn{definecolour}{definecolour}, \commandrefn{fcol}{fcol}.
2133
2134 %\subsection*{baselineskip}
2135 %\subsection*{boxit:1}\label{boxit}
2136
2137 \subsection*{brclear:0}\label{brclear}
2138
2139 Stops aligning content following a left or right-aligned image in HTML only.
2140
2141 See also \commandrefn{imagel}{imagel}, \commandrefn{imager}{imager}.
2142
2143 \subsection*{cextract:0}\label{cextract}
2144
2145 Prints a C++ extraction operator (\cextract).
2146
2147 \subsection*{chapterheading:1}\label{chapterheading}
2148
2149 Like \commandrefn{chapter}{chapter}, but does not increment the chapter
2150 number and does not print a chapter number in the printed documentation
2151 contents page, or in the chapter heading. Used to implement \helpref{glossaries}{glossarysection} and
2152 other sections that are not real chapters.
2153
2154 \subsection*{cinsert:0}\label{cinsert}
2155
2156 Prints a C++ insertion operator (\cinsert).
2157
2158 \subsection*{class:1}\label{class}
2159
2160 Outputs the argument, an index entry (\LaTeX\ only) and a keyword entry (WinHelp only).
2161 Used in class reference documentation.
2162
2163 %\subsection*{cleardoublepage}
2164 %\subsection*{clearpage}
2165 %\subsection*{cline}
2166 \subsection*{clipsfunc:3}\label{clipsfunc}
2167
2168 Formats a CLIPS function, given the return value, function name, and
2169 arguments.
2170
2171 %\subsection*{columnsep}
2172 \subsection*{copyright:0}\label{copyright}
2173
2174 Outputs the copyright symbol.
2175
2176 \subsection*{cparam:2}\label{cparam}
2177
2178 Formats a CLIPS type and argument. Used within the third argument of
2179 a \commandrefn{clipsfunc}{clipsfunc} command.
2180
2181 \subsection*{definecolour:4}\label{definecolour}
2182
2183 Defines a new colour that can be used in the document (RTF only). This
2184 command can also be spelt \verb$\definecolor$.
2185
2186 The first argument is the lower-case name of the colour, and the following
2187 three arguments specify the red, green and blue intensities, in the range 0 to 255.
2188
2189 The default colours are equivalent to the following definitions:
2190
2191 \begin{verbatim}
2192 \definecolour{black}{0}{0}{0}
2193 \definecolour{cyan}{0}{255}{255}
2194 \definecolour{green}{0}{255}{0}
2195 \definecolour{magenta}{255}{0}{255}
2196 \definecolour{red}{255}{0}{0}
2197 \definecolour{yellow}{255}{255}{0}
2198 \definecolour{white}{255}{255}{255}
2199 \end{verbatim}
2200
2201 To use colours in a document, use the \commandrefn{fcol}{fcol} and \commandrefn{bcol}{bcol} commands.
2202
2203 Note that a document that defines its own colours should be converted twice within
2204 the same Tex2RTF session.
2205
2206 \subsection*{fcol:2}\label{fcol}
2207
2208 Sets the foreground colour for a block of text (RTF and HTML).
2209
2210 For example:
2211
2212 \begin{verbatim}
2213 This sentence is brightened up by some \fcol{red}{red text}.
2214 \end{verbatim}
2215
2216 gives:
2217
2218 This sentence is brightened up by some \fcol{red}{red text}.
2219
2220 See also \commandrefn{definecolour}{definecolour}, \commandrefn{bcol}{bcol}.
2221
2222 \subsection*{followedlinkcolour:1}\label{followedlinkcolour}
2223
2224 Specifies the followed link colour for the whole page, HTML only. The argument consists
2225 of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
2226
2227 For example:
2228
2229 \begin{verbatim}
2230 \followedlinkcolour{255;255;255}
2231 \followedlinkcolour{0;0;255}
2232 \end{verbatim}
2233
2234 The first example sets the followed link text to white, and the second sets the followed link text to blue.
2235
2236 See also \commandrefn{backgroundcolour}{backgroundcolour}, \commandrefn{textcolour}{textcolour},
2237 \rtfsp\commandrefn{linkcolour}{linkcolour}.
2238
2239 Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
2240 setting, {\it followedLinkColour}.
2241
2242 \subsection*{footnotepopup:2}\label{footnotepopup}
2243
2244 In linear RTF, a footnote is created following the first argument, as with
2245 \commandref{footnote}{footnote}.
2246
2247 In WinHelp RTF, a the first argument is highlighted and becomes
2248 a popup reference to the second argument. See also \commandref{footnote}{footnote}\rtfsp
2249 and \commandref{popref}{popref}.
2250
2251 This command is not supported for formats other than \LaTeX,
2252 linear RTF and WinHelp RTF.
2253
2254 %\subsection*{footskip}\label{footskip}
2255 %\subsection*{framebox:1}\label{framebox}
2256
2257 \subsection*{functionsection:1}\label{functionsection}
2258
2259 Defines a subsection, adding the C++ function name to the \LaTeX\ index or the
2260 WinHelp keyword list.
2261
2262 Should be followed by a \commandrefn{func}{func} command to specify function
2263 details.
2264
2265 \subsection*{func:3}\label{func}
2266
2267 Defines a C++ function, given the return type, function name, and parameter list.
2268
2269 Should occur after a \commandrefn{functionsection}{functionsection} command.
2270
2271 %\subsection*{glossary:}\label{glossary}
2272 \subsection*{gloss:1}\label{gloss}
2273
2274 Marks a glossary entry. In \LaTeX, this is a synonym for an \commandrefn{item}{item}
2275 with an optional argument, within a \commandrefn{description}{description} environment,
2276 and the argument is added to the index.
2277
2278 In Windows Help, this is identical to a \commandrefn{section*}{sectionX} in a report.
2279
2280 If labels are associated with the glossary entries, they can be referenced by
2281 \commandref{helpref}{helpref} or \commandref{popref}{popref} jumps. A glossary entry is
2282 currently the only type of destination that popref may refer to.
2283
2284 This is an example of making a glossary in a report:
2285
2286 \begin{verbatim}
2287 \begin{helpglossary}
2288
2289 \gloss{API}\label{api}
2290
2291 Application Programmer's Interface - a set of calls and
2292 classes defining how a library (in this case, wxWindows)
2293 can be used.
2294
2295 \gloss{Canvas}\label{canvas}
2296
2297 A canvas in XView and wxWindows is a subwindow...
2298
2299 \gloss{DDE}\label{dde}
2300
2301 Dynamic Data Exchange - Microsoft's interprocess
2302 communication protocol. wxWindows provides an abstraction
2303 of DDE under both Windows and UNIX.
2304
2305 \end{helpglossary}
2306 \end{verbatim}
2307
2308 %\subsection*{headheight}\label{headheight}
2309 \subsection*{helpglossary:1}\label{helpglossary}
2310
2311 An environment for making a glossary (not standard \LaTeX). See \commandrefn{gloss}{gloss} for
2312 usage.
2313
2314 \subsection*{helpignore:1}\label{helpignore}
2315
2316 Ignores the argument in Tex2RTF generated files, but not \LaTeX.
2317
2318 \subsection*{helponly:1}\label{helponly}
2319
2320 Only outputs the argument in Tex2RTF generated files.
2321
2322 \subsection*{helpinput:1}\label{helpinput}
2323
2324 Only includes the given file in Tex2RTF generated files.
2325
2326 \subsection*{helpfontfamily:1}\label{helpfontfamily}
2327
2328 Specifies the font family for Tex2RTF generated files. The argument
2329 may be Swiss or Times.
2330
2331 \subsection*{helpfontsize:1}\label{helpfontsize}
2332
2333 Specifies the font size for Tex2RTF generated files.
2334
2335 \subsection*{helpref:2}\label{helpref}
2336
2337 Specifies a jump to a labelled chapter, section, subsection subsubsection
2338 or figure.
2339
2340 The first argument is text to be highlighted (mouseable in help systems)
2341 and the second is the reference label. In linear documents, the section number
2342 is given following the text, unless the \commandrefn{helprefn}{helprefn} command
2343 is used instead, where the section number is suppressed.
2344
2345 Note that when generating HTML, the label {\it contents} is automatically defined,
2346 and may be referenced using \verb$\helpref$.
2347
2348 \subsection*{helprefn:2}\label{helprefn}
2349
2350 Specifies a jump to a labelled chapter, section, subsection subsubsection
2351 or figure.
2352
2353 The first argument is text to be highlighted (mouseable in help systems)
2354 and the second is the reference label. See \commandrefn{helpref}{helpref} for
2355 the form where the section number is printed in linear documents.
2356
2357 %\subsection*{hfill}\label{hfill}
2358 \subsection*{htmlignore:1}\label{htmlignore}
2359
2360 Ignores the argument in HTML.
2361
2362 \subsection*{htmlonly:1}\label{htmlonly}
2363
2364 Only outputs the argument in HTML.
2365
2366 \subsection*{image:2}\label{image}
2367
2368 This is translated to a PSBOX macro package \verb$\psboxto$ command in \LaTeX,
2369 the first argument being a sizing command and the second a filename.
2370
2371 In HTML mode, the second argument is used to generate a PostScript file reference.
2372
2373 In RTF mode, the second argument is tried with first a BMP extension and
2374 then a WMF extension to find a suitable Windows bitmap file, placeable
2375 metafile, or segmented hypergraphics file (.SHG). If a suitable file is
2376 found, in Windows Help mode a {\tt bmc}\rtfsp command is inserted into
2377 the RTF file with a reference to the file. In linear RTF mode, the
2378 bitmap or metafile is converted into hex and inserted into the RTF
2379 document.
2380
2381 Note that only RGB-encoded Windows bitmaps, or placeable metafiles, are
2382 valid for input to Tex2RTF. You can convert a RLE (run length encoded)
2383 bitmap file into a (bigger) RGB file using a program such as Paintshop
2384 Pro. A placeable metafile has a special header with dimension
2385 information. One may be constructed by a wxWindows program by calling
2386 the function wxMakeMetafilePlaceable. The Microsoft Windows SDK has a
2387 sample program that loads and steps through placeable and ordinary
2388 metafiles.
2389
2390 Another wrinkle is that programs differ in the methods they
2391 use to recognise pictures in RTF files. You may need to use the {\it bitmapMethod} setting,
2392 which can be ``hex'' (embed the hex data in the file with a \verb$\dibitmap$ keyword),
2393 ``includepicture'' (use the MS Word 6.0 INCLUDEPICTURE field) or ``import''
2394 (an earlier name for INCLUDEPICTURE).
2395
2396 Here is an example of using the \verb$\image$ command.
2397
2398 \begin{verbatim}
2399 \begin{figure}
2400 $$\image{5cm;0cm}{heart.ps}$$
2401
2402 \caption{My picture}\label{piccy}
2403 \end{figure}
2404 \end{verbatim}
2405
2406 The dollars centre the image in the horizontal plane. The syntax
2407 of the first argument to \verb$\image$ is taken from syntax used by the \verb$\psbox$\rtfsp
2408 package: it allows specification of the horizontal and vertical
2409 dimensions of the image. Scaling will take place for PostScript
2410 and metafile images. A value of zero indicates that the image should
2411 be scaled in proportion to the non-zero dimension. Zeros for both
2412 dimensions will leave the image unscaled in the case of metafiles,
2413 or scaled to fit the page in the case of PostScript.
2414
2415 See also \commandrefn{imagel}{imagel}, \commandrefn{imager}{imager} for aligned images in
2416 HTML.
2417
2418 \subsection*{imagel:2}\label{imagel}
2419
2420 Similar to \commandrefn{image}{image}, but left-aligns the image with respect to the following
2421 content. Use \commandrefn{brclear}{brclear} to stop aligning the content to the right of the image.
2422
2423 See also \commandrefn{imager}{imager}.
2424
2425 \subsection*{imagemap:3}\label{imagemap}
2426
2427 This is translated to an HTML image map reference, or (in LaTeX) a PostScript psbox
2428 command. This allows images in HTML to have hotspots, where the user clicks on a
2429 part of the image and the browser jumps to a particular file.
2430
2431 The first argument is the same as the first argument to the \commandref{image}{image}\rtfsp
2432 command (ignored in HTML). The second argument must be the name of the
2433 image map entry, and the second is the filename to be displayed inline.
2434
2435 \begin{verbatim}
2436 \imagemap{}{tree.gif}{myname}
2437 \end{verbatim}
2438
2439 translates to:
2440
2441 \begin{verbatim}
2442 <a href="/cgi-bin/imagemap/mymap">
2443 <img src="tree.gif" ismap></a><p>
2444 \end{verbatim}
2445
2446 The snag with this is that, apart from the inconvenience of having to
2447 register a map file with the server, the map file will also have
2448 references to particular HTML files. If they exist in the current
2449 document, these names are not known until the file is generated. In which case, the
2450 map entries should probably refer to symbolic links that can be easily
2451 changed later.
2452
2453 \subsection*{imager:2}\label{imager}
2454
2455 Similar to \commandrefn{image}{image}, but right-aligns the image with respect to the following
2456 content. Use \commandrefn{brclear}{brclear} to stop aligning the content to the left of the image.
2457
2458 See also \commandrefn{imagel}{imagel}.
2459
2460 %\subsection*{includeonly}\label{includeonly}
2461 \subsection*{indented:2}\label{indented}
2462
2463 Environment supplied by Tex2RTF to allow (possibly nested) indentation of
2464 \LaTeX\ and RTF text. The first argument is the amount to be indented.
2465
2466 For example:
2467
2468 \begin{verbatim}
2469 \begin{indented}{2cm}
2470 This text should be indented by a couple of centimetres.
2471 This can be useful to highlight paragraphs.
2472 \end{indented}
2473 \end{verbatim}
2474
2475 produces:
2476
2477 \begin{indented}{2cm}
2478 This text should be indented by a couple of centimetres. This can be
2479 useful to highlight paragraphs.
2480 \end{indented}
2481
2482 \subsection*{latexignore:1}\label{latexignore}
2483
2484 Ignores the argument in \LaTeX.
2485
2486 \subsection*{latexonly:1}\label{latexonly}
2487
2488 Only prints the argument in \LaTeX.
2489
2490 %\subsection*{lbox}\label{lbox}
2491
2492 \subsection*{lbraceraw:0}\label{lbraceraw}
2493
2494 Outputs a raw left brace into the output (not LaTeX). Useful when
2495 inserting RTF (for example) that cannot be dealt with by Tex2RTF.
2496
2497 \subsection*{linkcolour:1}\label{linkcolour}
2498
2499 Specifies the link colour for the whole page, HTML only. The argument consists
2500 of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
2501
2502 For example:
2503
2504 \begin{verbatim}
2505 \linkcolour{255;255;255}
2506 \linkcolour{0;0;255}
2507 \end{verbatim}
2508
2509 The first example sets the link text to white, and the second sets the link text to blue.
2510
2511 See also \commandrefn{backgroundcolour}{backgroundcolour}, \commandrefn{textcolour}{textcolour},
2512 \rtfsp\commandrefn{followedlinkcolour}{followedlinkcolour}.
2513
2514 Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
2515 setting, {\it linkColour}.
2516
2517 \subsection*{membersection:1}\label{membersection}
2518
2519 Used when formatting C++ classes to print a subsection for the member name.
2520
2521 \subsection*{member:1}\label{member}
2522
2523 Used to format a C++ member variable name.
2524
2525 \subsection*{normalbox:1}\label{normalbox}
2526
2527 Draws a box around the given paragraph in \LaTeX\ and RTF. In HTML
2528 and XLP formats, horizontal rules are drawn before and after the text.
2529
2530 For example:
2531
2532 \begin{verbatim}
2533 \normalbox{This should be a boxed paragraph for highlighting
2534 important information, such as information for registering
2535 a shareware program.}
2536 \end{verbatim}
2537
2538 gives:
2539
2540 \normalbox{This should be a boxed paragraph for highlighting important
2541 information, such as information for registering a shareware program.}
2542
2543 See also \commandrefn{normalboxd}{normalboxd} for double-bordered text.
2544
2545 \subsection*{normalboxd:1}\label{normalboxd}
2546
2547 Draws a double border around the given paragraph in \LaTeX\ and RTF. In
2548 HTML and XLP formats, horizontal rules are drawn before and after the
2549 text.
2550
2551 For example:
2552
2553 \begin{verbatim}
2554 \normalboxd{This should be a boxed paragraph for
2555 highlighting important information, such as information
2556 for registering a shareware program.}
2557 \end{verbatim}
2558
2559 gives:
2560
2561 \normalboxd{This should be a boxed paragraph for highlighting important
2562 information,such as information for registering a shareware program.}
2563
2564 See also \commandrefn{normalbox}{normalbox} for single-bordered text.
2565
2566 \subsection*{param:1}\label{param}
2567
2568 Formats a C++ type and argument pair. Should be used within the third argument
2569 of a a \commandrefn{func}{func} command.
2570
2571 \subsection*{popref:2}\label{popref}
2572
2573 Similar to \commandrefn{helprefn}{helprefn}, except that in Windows Help,
2574 the destination text is popped up in a small window to be dismissed with
2575 a mouse click, instead of going to a separate section.
2576
2577 Currently this command can only refer to a labelled glossary entry; see
2578 \commandrefn{gloss}{gloss}.
2579
2580 \subsection*{psboxto:2}\label{psboxto}
2581
2582 Identical to \commandrefn{image}{image}.
2583
2584 %\subsection*{psbox}\label{psbox}
2585 \subsection*{rbraceraw:0}\label{rbraceraw}
2586
2587 Outputs a raw right brace into the output (not LaTeX). Useful when
2588 inserting RTF (for example) that cannot be dealt with by Tex2RTF.
2589
2590 \subsection*{registered:0}\label{registered}
2591
2592 Outputs the `registered' symbol in HTML, and (r) in other formats.
2593
2594 \subsection*{row:1}\label{row}
2595
2596 A Tex2RTF command signifying the row of a table within the \commandrefn{tabular}{tabular}\rtfsp
2597 environment. See also \commandrefn{ruledrow}{ruledrow}.
2598
2599 \subsection*{ruledrow:1}\label{ruledrow}
2600
2601 A Tex2RTF command signifying a ruled row of a table within the \commandrefn{tabular}{tabular}\rtfsp
2602 environment. See also \commandrefn{row}{row}.
2603
2604 \subsection*{rtfignore:1}\label{rtfignore}
2605
2606 Ignores the argument in linear RTF.
2607
2608 \subsection*{rtfonly:1}\label{rtfonly}
2609
2610 Only outputs the argument in linear RTF.
2611
2612 \subsection*{rtfsp:0}\label{rtfsp}
2613
2614 Outputs a space in RTF. Tex2RTF tries to insert a space where one is implied
2615 by a newline, but cannot cope where a line starts or ends with a command,
2616 in the middle of a paragraph. Use this command to insert a space explicitly.
2617
2618 \subsection*{sectionheading:1}\label{sectionheading}
2619
2620 Like \commandrefn{section}{section}, but does not increment the section
2621 number and does not print a section number in the printed documentation
2622 contents page, or in the section heading.
2623
2624 \subsection*{setfooter:6}\label{setfooter}
2625
2626 Tex2RTF has a non-standard way of setting headers and footers,
2627 but the default macro definitions in {\tt texhelp.sty} may be altered
2628 to your current method.
2629
2630 The arguments are as follows:
2631
2632 \begin{enumerate}
2633 \itemsep=0pt
2634 \item Left footer, even pages
2635 \item Centre footer, even pages
2636 \item Right footer, even pages
2637 \item Left footer, odd pages
2638 \item Centre footer, odd pages
2639 \item Right footer, odd pages
2640 \end{enumerate}
2641
2642 For many documents, the first three arguments will be left empty.
2643
2644 The behaviour for first pages of a chapter, section or document
2645 is to have a blank header, but print the footer.
2646
2647 For best results, define headers and footers for {\it each chapter or
2648 section}.
2649
2650 Note that this command works only for \LaTeX\ and linear RTF. See also\rtfsp
2651 \commandrefn{setheader}{setheader}.
2652
2653 \subsection*{setheader:6}\label{setheader}
2654
2655 Tex2RTF has a non-standard way of setting headers and footers,
2656 but the default macro definitions in {\tt texhelp.sty} may be altered
2657 to your current method.
2658
2659 The arguments are as follows:
2660
2661 \begin{enumerate}
2662 \itemsep=0pt
2663 \item Left header, even pages
2664 \item Centre header, even pages
2665 \item Right header, even pages
2666 \item Left header, odd pages
2667 \item Centre header, odd pages
2668 \item Right header, odd pages
2669 \end{enumerate}
2670
2671 For many documents, the first three arguments will be left empty.
2672 If \commandrefn{pagestyle}{pagestyle} is not plain or empty, the
2673 header will separated from the rest of the page by a rule.
2674
2675 The behaviour for first pages of a chapter, section or document
2676 is to have a blank header, but print the footer.
2677
2678 For best results, define headers and footers for {\it each chapter or
2679 section}.
2680
2681 Note that this command works only for \LaTeX\ and linear RTF. See also\rtfsp
2682 \commandrefn{setfooter}{setfooter}.
2683
2684 \subsection*{sethotspotcolour:1}\label{sethotspotcolour}
2685
2686 If the argument is yes, on or ok, subsequent WinHelp hotspots will be green.
2687 If any other value, the hotspots will be the normal text colour. Note that this
2688 doesn't apply to section hotspots, only to helpref hotspots.
2689
2690 \subsection*{sethotspotunderline:1}\label{sethotspotunderline}
2691
2692 If the argument is yes, on or ok, subsequent WinHelp hotspots will be
2693 underlined (the default). If any other value, the hotspots will not be
2694 underlined. Note that this doesn't apply to section hotspots, only to
2695 helpref hotspots.
2696
2697 \subsection*{settransparency:1}\label{settransparency}
2698
2699 WinHelp mode only (version 4 of WinHelp). If the argument is yes, on or ok, subsequent bitmaps
2700 will be inserted in transparent mode: areas of white will be made transparent.
2701 If the argument is any other value (such as no, ok or false), the bitmaps will not be transparent.
2702
2703 \subsection*{textcolour:1}\label{textcolour}
2704
2705 Specifies the text foreground colour for the whole page, HTML only. The argument consists
2706 of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
2707
2708 For example:
2709
2710 \begin{verbatim}
2711 \textcolour{255;255;255}
2712 \textcolour{0;0;255}
2713 \end{verbatim}
2714
2715 The first example sets the text to white, and the second sets the text to blue.
2716
2717 See also \commandrefn{backgroundcolour}{backgroundcolour}, \commandrefn{linkcolour}{linkcolour},
2718 \rtfsp\commandrefn{followedlinkcolour}{followedlinkcolour}.
2719
2720 Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
2721 setting, {\it textColour}.
2722
2723 \subsection*{toocomplex:1}\label{toocomplex}
2724
2725 An environment for dealing with complex \LaTeX\ commands that
2726 Tex2RTF cannot handle. In normal \LaTeX, the argument will be output
2727 as normal. In Tex2RTF output, the argument will be output as verbatim text,
2728 for the user to hand-translate into the desired output format.
2729
2730 See also \commandrefn{comment}{comment}.
2731
2732 \subsection*{twocolitem:2}\label{twocolitem}
2733
2734 Used to specify a row for a two column list, a Tex2RTF
2735 extension to optimize two-column lists for different
2736 file formats. See \commandrefn{twocollist}{twocollist},
2737 \rtfsp\commandrefn{twocolitemruled}{twocolitemruled}.
2738
2739 \subsection*{twocolitemruled:2}\label{twocolitemruled}
2740
2741 Used to specify a ruled row for a two column list, a Tex2RTF
2742 extension to optimize two-column lists for different
2743 file formats. See \commandrefn{twocollist}{twocollist},
2744 \rtfsp\commandrefn{twocolitem}{twocolitem}.
2745
2746 \subsection*{twocollist:1}\label{twocollist}
2747
2748 A Tex2RTF environment for specifying a table of two columns, often
2749 used in manuals and help files (for example, for listing commands and
2750 their meanings). The first column should be one line only, and
2751 the second can be an arbitrary number of paragraphs.
2752
2753 The reason that a normal tabular environment cannot be used is that
2754 WinHelp does not allow borders in table cells, so a different method
2755 must be employed if any of the rows are to be ruled. In \LaTeX, a table
2756 is used to implement this environment. In RTF, indentation is used instead.
2757
2758 Use this environment in conjunction with \commandrefn{twocolitem}{twocolitem} and\rtfsp
2759 \commandrefn{twocolitemruled}{twocolitemruled}. To set the widths of the first
2760 and second column, use \commandrefn{twocolwidtha}{twocolwidtha} and\rtfsp
2761 \commandrefn{twocolwidthb}{twocolwidthb}.
2762
2763 Example:
2764
2765 \begin{verbatim}
2766 \htmlignore{\begin{twocollist}}
2767 \twocolitemruled{{\bf Command}}{{\bf Description}}
2768 \twocolitem{File}{The file menu is used to select various
2769 file-related operations, such as saving and loading.}
2770 \twocolitem{Edit}{The Edit menu is used for
2771 selection, copying, pasting, etc.}
2772 \end{twocollist}
2773 \end{verbatim}
2774
2775 This produces:
2776
2777 \begin{twocollist}
2778 \twocolitemruled{{\bf Command}}{{\bf Description}}
2779 \twocolitem{File}{The file menu is used to select various file-related
2780 operations, such as saving and loading.}
2781 \twocolitem{Edit}{The Edit menu is used for selection, copying, pasting, etc.}
2782 \end{twocollist}
2783
2784 \subsection*{twocolwidtha:1}\label{twocolwidtha}
2785
2786 Sets the width of the first column in a two column list to the given
2787 dimension. See also \commandrefn{twocollist}{twocollist} and \commandrefn{twocolwidthb}{twocolwidthb}.
2788
2789 \subsection*{twocolwidthb:1}\label{twocolwidthb}
2790
2791 Sets the width of the second column in a two column list to the given
2792 dimension. See also \commandrefn{twocollist}{twocollist} and \commandrefn{twocolwidtha}{twocolwidtha}.
2793
2794 \subsection*{urlref:2}\label{urlref}
2795
2796 Specifies a jump to a URL (univeral resource location).
2797
2798 The first argument is text to be highlighted (mouseable in HTML browsers)
2799 and the second is the URL. In linear documents, the URL
2800 is given following the text.
2801
2802 Example:
2803
2804 \begin{verbatim}
2805 See also the \urlref{wxWindows manual}
2806 {http://www.aiai.ed.ac.uk/~jacs.html}.
2807 \end{verbatim}
2808
2809 (the line is broken only to keep to this manual's page width).
2810
2811 \subsection*{winhelpignore:1}\label{winhelpignore}
2812
2813 Ignores the argument in WinHelp RTF.
2814
2815 \subsection*{winhelponly:1}\label{winhelponly}
2816
2817 Only outputs the argument in WinHelp RTF.
2818
2819 \subsection*{xlpignore:1}\label{xlpignore}
2820
2821 Ignores the argument in XLP mode (wxHelp files).
2822
2823 \subsection*{xlponly:1}\label{xlponly}
2824
2825 Only outputs the argument in XLP mode (wxHelp files).
2826
2827 \section{Accents}\label{accents}
2828
2829 The following \LaTeX\ accents work for RTF and HTML production:
2830
2831 \begin{itemize}%
2832 \itemsep=0pt
2833 \item \verb$\'{a}$ produces \'{a}. Valid for a, e, i, o, u, A, E, I, O, U
2834 \item \verb$\`{a}$ produces \`{a}. Valid for a, e, i, o, u, y, A, E, I, O, U, Y
2835 \item \verb$\^{a}$ produces \^{a}. Valid for a, e, i, o, u, A, E, I, O, U
2836 \item \verb$\~{a}$ produces \~{a}. Valid for a, n, o, A, N, O
2837 \item \verb$\"{a}$ produces \"{a}. Valid for a, e, i, o, u, y, A, E, I, O, U, Y
2838 \item \verb$\.{a}$ produces \.{a}. Valid for a, A
2839 \end{itemize}
2840
2841 \section{Commands by category}\index{commands}%
2842
2843 Below are categories of \LaTeX\ commands, to help you find the right
2844 command for a particular purpose.
2845
2846 \subsection{Font commands}
2847
2848 \begin{itemize}\itemsep=0pt
2849 \item \commandpageref{bf}{bf}
2850 \item \commandpageref{bffamily}{bffamily}
2851 \item \commandpageref{em}{em}
2852 \item \commandpageref{emph}{emph}
2853 \item \commandpageref{huge}{huge1}
2854 \item \commandpageref{Huge}{Huge2}
2855 \item \commandpageref{HUGE}{HUGE3}
2856 \item \commandpageref{it}{it}
2857 \item \commandpageref{itshape}{itshape}
2858 \item \commandpageref{large}{large1}
2859 \item \commandpageref{Large}{Large2}
2860 \item \commandpageref{LARGE}{LARGE3}
2861 \item \commandpageref{mdseries}{mdseries}
2862 \item \commandpageref{normalsize}{normalsize}
2863 \item \commandpageref{rm}{rm}
2864 \item \commandpageref{rmfamily}{rmfamily}
2865 \item \commandpageref{sc}{sc}
2866 \item \commandpageref{scshape}{scshape}
2867 \item \commandpageref{sf}{sf}
2868 \item \commandpageref{sffamily}{sffamily}
2869 \item \commandpageref{sl}{sl}
2870 \item \commandpageref{slshape}{slshape}
2871 \item \commandpageref{small}{small}
2872 \item \commandpageref{textbf}{textbf}
2873 \item \commandpageref{textit}{textit}
2874 \item \commandpageref{textrm}{textrm}
2875 \item \commandpageref{textsf}{textsf}
2876 \item \commandpageref{textsc}{textsc}
2877 \item \commandpageref{textsl}{textsl}
2878 \item \commandpageref{texttt}{texttt}
2879 \item \commandpageref{tiny}{tiny}
2880 \item \commandpageref{tt}{tt}
2881 \item \commandpageref{ttfamily}{ttfamily}
2882 \item \commandpageref{underline}{underline}
2883 \item \commandpageref{upshape}{upshape}
2884 \end{itemize}
2885
2886 \subsection{Paragraph formatting}
2887
2888 \begin{itemize}\itemsep=0pt
2889 \item \commandpageref{centerline}{centerline}
2890 \item \commandpageref{comment}{comment}
2891 \item \commandpageref{flushleft}{flushleft}
2892 \item \commandpageref{footnote}{footnote}
2893 \item \commandpageref{indented}{indented}
2894 \item \commandpageref{marginparwidth}{marginparwidth}
2895 \item \commandpageref{marginpar}{marginpar}
2896 \item \commandpageref{marginpareven}{marginpareven}
2897 \item \commandpageref{marginparodd}{marginparodd}
2898 \item \commandpageref{multicolumn}{multicolumn}
2899 \item \commandpageref{newpage}{newpage}
2900 \item \commandpageref{noindent}{noindent}
2901 \item \commandpageref{onecolumn}{onecolumn}
2902 \item \commandpageref{parindent}{parindent}
2903 \item \commandpageref{parskip}{parskip}
2904 \item \commandpageref{par}{par}
2905 \item \commandpageref{quote}{quote}
2906 \item \commandpageref{quotation}{quotation}
2907 \item \commandpageref{textwidth}{textwidth}
2908 \item \commandpageref{twocolumn}{twocolumn}
2909 \item \commandpageref{verbatim}{verbatim}
2910 \item \commandpageref{verb}{verb}
2911 \end{itemize}
2912
2913 \subsection{Special effects}
2914
2915 \begin{itemize}\itemsep=0pt
2916 \item \commandpageref{backgroundcolour}{backgroundcolour}
2917 \item \commandpageref{backgroundimage}{backgroundimage}
2918 \item \commandpageref{backslashraw}{backslashraw}
2919 \item \commandpageref{bcol}{bcol}
2920 \item \commandpageref{definecolour}{definecolour}
2921 \item \commandpageref{fcol}{fcol}
2922 \item \commandpageref{followedlinkcolour}{followedlinkcolour}
2923 \item \commandpageref{helpfontfamily}{helpfontfamily}
2924 \item \commandpageref{helpfontsize}{helpfontsize}
2925 \item \commandpageref{hrule}{hrule}
2926 \item \commandpageref{linkcolour}{linkcolour}
2927 \item \commandpageref{normalbox}{normalbox}
2928 \item \commandpageref{normalboxd}{normalboxd}
2929 \item \commandpageref{sethotspotcolour}{sethotspotcolour}
2930 \item \commandpageref{sethotspotunderline}{sethotspotunderline}
2931 \item \commandpageref{settransparency}{settransparency}
2932 \item \commandpageref{textcolour}{textcolour}
2933 \item \commandpageref{typeout}{typeout}
2934 \end{itemize}
2935
2936 \subsection{Lists}
2937
2938 \begin{itemize}\itemsep=0pt
2939 \item \commandpageref{description}{description}
2940 \item \commandpageref{enumerate}{enumerate}
2941 \item \commandpageref{itemize}{itemize}
2942 \item \commandpageref{item}{item}
2943 \item \commandpageref{itemsep}{itemsep}
2944 \item \commandpageref{twocolitem}{twocolitem}
2945 \item \commandpageref{twocolitemruled}{twocolitemruled}
2946 \item \commandpageref{twocollist}{twocollist}
2947 \item \commandpageref{twocolwidtha}{twocolwidtha}
2948 \item \commandpageref{twocolwidthb}{twocolwidthb}
2949 \end{itemize}
2950
2951 \subsection{Sectioning}
2952
2953 \begin{itemize}\itemsep=0pt
2954 \item \commandpageref{chapter}{chapter}
2955 \item \commandpageref{chapter*}{chaptersX}
2956 \item \commandpageref{chapterheading}{chapterheading}
2957 \item \commandpageref{insertatlevel}{insertatlevel}
2958 \item \commandpageref{paragraph}{paragraph}
2959 \item \commandpageref{paragraph*}{paragraphX}
2960 \item \commandpageref{section}{section}
2961 \item \commandpageref{section*}{sectionX}
2962 \item \commandpageref{sectionheading}{sectionheading}
2963 \item \commandpageref{subparagraph}{subparagraph}
2964 \item \commandpageref{subparagraph*}{subparagraphX}
2965 \item \commandpageref{subsection}{subsection}
2966 \item \commandpageref{subsection*}{subsectionX}
2967 \item \commandpageref{subsubsection}{subsubsection}
2968 \item \commandpageref{subsubsection*}{subsubsectionX}
2969 \end{itemize}
2970
2971 \subsection{Pictures}
2972
2973 \begin{itemize}\itemsep=0pt
2974 \item \commandpageref{brclear}{brclear}
2975 \item \commandpageref{image}{image}
2976 \item \commandpageref{imagel}{imagel}
2977 \item \commandpageref{imagemap}{imagemap}
2978 \item \commandpageref{imager}{imager}
2979 \item \commandpageref{psboxto}{psboxto}
2980 \end{itemize}
2981
2982 \subsection{References and jumps}
2983
2984 \begin{itemize}\itemsep=0pt
2985 \item \commandpageref{footnotepopup}{footnotepopup}
2986 \item \commandpageref{helpref}{helpref}
2987 \item \commandpageref{helprefn}{helprefn}
2988 \item \commandpageref{label}{label}
2989 \item \commandpageref{pageref}{pageref}
2990 \item \commandpageref{popref}{popref}
2991 \item \commandpageref{ref}{ref}
2992 \item \commandpageref{urlref}{urlref}
2993 \end{itemize}
2994
2995 \subsection{Tables and figures}
2996
2997 \begin{itemize}\itemsep=0pt
2998 \item \commandpageref{caption}{caption}
2999 \item \commandpageref{figure}{figure}
3000 \item \commandpageref{hline}{hline}
3001 \item \commandpageref{ruledrow}{ruledrow}
3002 \item \commandpageref{tabbing}{tabbing}
3003 \item \commandpageref{tabular}{tabular}
3004 \end{itemize}
3005
3006 \subsection{Table of contents}
3007
3008 \begin{itemize}\itemsep=0pt
3009 \item \commandpageref{addcontentsline}{addcontentsline}
3010 \item \commandpageref{author}{author}
3011 \item \commandpageref{date}{date}
3012 \item \commandpageref{maketitle}{maketitle}
3013 \item \commandpageref{tableofcontents}{tableofcontents}
3014 \item \commandpageref{title}{title}
3015 \end{itemize}
3016
3017 \subsection{Special sections}
3018
3019 \begin{itemize}\itemsep=0pt
3020 \item \commandpageref{bibitem}{bibitem}
3021 \item \commandpageref{bibliographystyle}{bibliographystyle}
3022 \item \commandpageref{bibliography}{bibliographycmd}
3023 \item \commandpageref{cite}{cite}
3024 \item \commandpageref{gloss}{gloss}
3025 \item \commandpageref{helpglossary}{helpglossary}
3026 \item \commandpageref{index}{index}
3027 \item \commandpageref{nocite}{nocite}
3028 \item \commandpageref{printindex}{printindex}
3029 \item \commandpageref{shortcite}{shortcite}
3030 \item \commandpageref{thebibliography}{thebibliography}
3031 \end{itemize}
3032
3033
3034 \subsection{Symbols}
3035
3036 \begin{itemize}\itemsep=0pt
3037 \item \commandpageref{backslash}{backslash}
3038 \item \commandpageref{cdots}{cdots}
3039 \item \commandpageref{cextract}{cextract}
3040 \item \commandpageref{cinsert}{cinsert}
3041 \item \commandpageref{copyright}{copyright}
3042 \item \commandpageref{LaTeX}{LaTeX}
3043 \item \commandpageref{lbraceraw}{lbraceraw}
3044 \item \commandpageref{ldots}{ldots}
3045 \item \commandpageref{rbraceraw}{rbraceraw}
3046 \item \commandpageref{registered}{registered}
3047 \item \commandpageref{rtfsp}{rtfsp}
3048 \item \commandpageref{ss}{ss}
3049 \item \commandpageref{TeX}{TeX}
3050 \item \commandpageref{today}{today}
3051 \end{itemize}
3052
3053 \subsection{Document organisation}
3054
3055 \begin{itemize}\itemsep=0pt
3056 \item \commandpageref{document}{document}
3057 \item \commandpageref{documentstyle}{documentstyle}
3058 \item \commandpageref{helpignore}{helpignore}
3059 \item \commandpageref{helponly}{helponly}
3060 \item \commandpageref{helpinput}{helpinput}
3061 \item \commandpageref{htmlignore}{htmlignore}
3062 \item \commandpageref{htmlonly}{htmlonly}
3063 \item \commandpageref{include}{include}
3064 \item \commandpageref{input}{input}
3065 \item \commandpageref{latexignore}{latexignore}
3066 \item \commandpageref{latexonly}{latexonly}
3067 \item \commandpageref{newcommand}{newcommand}
3068 \item \commandpageref{pagestyle}{pagestyle}
3069 \item \commandpageref{pagenumbering}{pagenumbering}
3070 \item \commandpageref{rtfignore}{rtfignore}
3071 \item \commandpageref{rtfonly}{rtfonly}
3072 \item \commandpageref{setfooter}{setfooter}
3073 \item \commandpageref{setheader}{setheader}
3074 \item \commandpageref{special}{special}
3075 \item \commandpageref{toocomplex}{toocomplex}
3076 \item \commandpageref{verbatiminput}{verbatiminput}
3077 \item \commandpageref{winhelpignore}{winhelpignore}
3078 \item \commandpageref{winhelponly}{winhelponly}
3079 \item \commandpageref{xlpignore}{xlpignore}
3080 \item \commandpageref{xlponly}{xlponly}
3081 \end{itemize}
3082
3083 \chapter{Bugs and troubleshooting}\label{errors}\index{bugs}\index{errors}\index{troubleshooting}%
3084 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
3085 \setfooter{\thepage}{}{}{}{}{\thepage}%
3086
3087 \section{Bugs}
3088
3089 \begin{description}
3090 \item[Command parsing.] If a command is used followed by inappropriate
3091 argument syntax, Tex2RTF can crash. This an occur when a command is
3092 used in an asterisk form that is only formed in the non-asterisk
3093 variety. The non-asterisk form is assumed, which makes the following
3094 asterisk trip up the parser.
3095 \item[Setlength.] Using the $\backslash$setlength command doesn't work,
3096 since its first argument looks like a command with the wrong number
3097 of arguments. Use an alternative form instead, e.g. \verb$\parindent 0pt$ instead
3098 of \verb$\setlength{parindent}{0pt}$.
3099 \item[Newcommand bug.] Environments in a command definition confuse
3100 Tex2RTF. Use the command form instead (e.g. $\backslash$flushleft\{...\} instead
3101 of $\backslash$begin\{flushleft\} ... $\backslash$end\{flushleft\}.
3102 \item[Bibliography.] There's no flexibility in the way references
3103 are output: I expect I'll get round to doing something better,
3104 but only if people tell me they need it!
3105 \item[Tables.] Tables can't handle all \LaTeX\ syntax, and require
3106 the Tex2RTF \verb$\row$ commands for decent formatting. Still, it's
3107 better than it was (RTF only).
3108 \item[Indexes and glossaries.] Not completely supported.
3109 \item[Crashes.] Crashes may be due to an input file exceeding the fixed-size
3110 buffer used for converting command arguments, especially for the \verb$\verbatim$\rtfsp
3111 command. Use the {\tt -bufsize} switch to increase the buffer size.
3112 \item[Verbatiminput.] Verbatiminput files which do not end with a blank line
3113 can trip up following commands.
3114 \end{description}
3115
3116 \section{Troubleshooting}
3117
3118 Below are some common problems and possible solutions.
3119
3120 \normalbox{Some of the syntax that is OK for true \LaTeX\ but which trips up
3121 Tex2RTF, may be detected by the TCHECK program included in the tools
3122 directory of the Tex2RTF distribution. Some \LaTeX\ errors may be picked up
3123 by the LACHECK program, also found in the tools directory.}
3124
3125 \subsection{Macro not found}\label{macronotfound}\index{macro not found error}%
3126
3127 This error may indicate that Tex2RTF has not implemented a standard
3128 \rtfsp\LaTeX\ command, or that a local macro package is being used that
3129 Tex2RTF does not know about. It can cause spurious secondary
3130 errors, such as not recognising the end document command.
3131
3132 You can get round this by defining a macro file (default name {\tt tex2rtf.ini})
3133 containing command definitions, such as:
3134
3135 \begin{verbatim}
3136 \crazy [2]{{\bf #2} is crazy but #1 is not}
3137 \something [0]{}
3138 \julian [0]{Julian Smart}
3139 \end{verbatim}
3140
3141 New commands may be defined in \LaTeX\ files, but custom macro files
3142 will have to be defined when local style files are being used. See\rtfsp
3143 \helpref{Initialisation file syntax}{inifile} for further details.
3144
3145 The `Macro not found' error can also be caused by a syntax error such as
3146 an unbalanced brace or passing the wrong number of arguments to a command,
3147 so look in the vicinity of the reported error for the real cause.
3148
3149 Here is one obscure situation that causes this error:
3150
3151 \begin{verbatim}
3152 \begin{center}
3153 {\large{\underline{A}}}
3154 \end{center}
3155 \end{verbatim}
3156
3157 The problem is too many curly brackets. This should be rewritten as:
3158
3159 \begin{verbatim}
3160 \begin{center}
3161 {\large \underline{A}}
3162 \end{center}
3163 \end{verbatim}
3164
3165 Often you get a `Macro not found' error for \verb$\end{document}$. This
3166 is a spurious side-effect of an earlier error, usually an incorrect number
3167 of arguments to a command. The location of the true error is then anywhere
3168 in the document. To home in on the error, try putting a verbatim environment
3169 \rtfsp\verb$\begin{comment}...\end{comment}$ around much of the document,
3170 and then move the \verb$\begin{comment}$ line down until the error
3171 manifests itself.
3172
3173 \subsection{Unresolved reference}\index{references, unresolved}%
3174
3175 References and citations are usually resolved on a second pass of
3176 Tex2RTF. If this doesn't work, then a missing label or bibliographical
3177 entry is to blame.
3178
3179 \subsection{Output crashes the RTF reader}
3180
3181 This could be due to confusing table syntax. Set {\it compatibility} to\rtfsp
3182 {\it TRUE} in {\tt .ini} file; also check for end of row characters backslash characters
3183 on their own on a line, and insert correct number of ampersands for the number of
3184 columns. E.g.
3185
3186 \begin{verbatim}
3187 hello & world\\
3188 \\
3189 \end{verbatim}
3190
3191 becomes
3192
3193 \begin{verbatim}
3194 hello & world\\
3195 &\\
3196 \end{verbatim}
3197
3198 \subsection{Erratic list indentation}
3199
3200 Try increasing the value of the variable {\it listItemIndent} (default 40
3201 points) to give more space between label and following text. A global
3202 replacement of \verb$\item [$ with \verb$\item[$ may also be helpful to remove
3203 unnecessary space before the item label.
3204
3205 \subsection{Missing figure or section reference}
3206
3207 Ensure all labels {\it directly} follow captions or sections (no intervening
3208 white space).
3209
3210 \subsection{Linear RTF looks odd}
3211
3212 For viewing by programs other than MS Word, you should set the variable {\it useWord} to {\it false}. This
3213 will turn off some of the special RTF keywords recognised by Word (and possibly other advanced RTF readers).
3214
3215 \subsection{Paragraphs preceding lists are formatted weirdly.}
3216
3217 If a list has spurious spacing in it, e.g. before a \verb$\item$ command, the preceding
3218 paragraph can take on some of the list's indentation. This may be a WinHelp bug, or an aspect
3219 of RTF I don't fully understand. The solution is to remove unnecessary space.
3220
3221 \subsection{Unresolved references in Word for Windows}\index{Microsoft Word}%
3222
3223 If question marks appear instead of numbers for figures and tables,
3224 select all (e.g. CTRL-A), then press F9 {\it twice} to reformat the
3225 document twice. For the second format, respond with {\it Update Entire
3226 Table} to any prompts.
3227
3228 \subsection{The Windows 95 help file contents hierarchy looks wrong}\index{WinHelp files}%
3229
3230 WinHelp version 4 (or the WIN32 Help Compiler) does not allow a
3231 book in the contents list to be followed by a page at the same level.
3232 A book must be followed by a book, for some strange reason, otherwise
3233 the page will be tacked on to the pages of the book above it, i.e. placed
3234 at the wrong level.
3235
3236 To get around this, Tex2RTF inserts a book in some places, if there
3237 was a book preceding it on the same level. This results in more
3238 navigation than necessary, but is better than a wrong contents page.
3239
3240 \newpage
3241
3242 % Puts books in the bibliography without needing to cite them in the
3243 % text
3244 \nocite{smart93a}%
3245 \nocite{kopka}%
3246 \nocite{pfeiffer}%
3247
3248 \bibliography{refs}
3249 \addcontentsline{toc}{chapter}{Bibliography}
3250 \setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}%
3251 \setfooter{\thepage}{}{}{}{}{\thepage}%
3252
3253 \begin{helpglossary}
3254 \setheader{{\it GLOSSARY}}{}{}{}{}{{\it GLOSSARY}}%
3255 \setfooter{\thepage}{}{}{}{}{\thepage}%
3256
3257 \gloss{GUI}
3258
3259 Graphical User Interface, such as Windows 3 or X.
3260
3261 \gloss{HTML}\label{html}
3262
3263 Hypertext Markup Language; an SGML document type, used for providing
3264 hypertext information on the World Wide Web, a distributed hypertext
3265 system on the Internet.
3266
3267 \gloss{LaTeX}\label{latexgloss}
3268
3269 A typesetting language implemented as a set of \TeX\ macros. It is
3270 distinguished for allowing specification of the document structure,
3271 whilst taking care of most layout concerns. It represents the opposite
3272 end of the spectrum from WYSIWYG word processors.
3273
3274 \gloss{RTF}\label{rtf}
3275
3276 Rich Text Format: an interchange format for word processor files,
3277 used for importing and exporting formatted documents, and as the
3278 input to the Windows Help compiler.
3279
3280 \gloss{wxHelp}\label{wxhelp}
3281
3282 wxHelp is the hypertext help facility used to provide on-line
3283 documentation for UNIX-based wxWindows applications. Under Windows 3.1,
3284 Windows Help is used instead.
3285
3286 \gloss{wxWindows}\label{wxwindows}
3287
3288 wxWindows is a free C++ toolkit for writing applications that are
3289 portable across several platforms. Currently these are Motif, Open Look,
3290 Windows 3.1 and Windows NT. Tex2RTF is written using wxWindows.
3291
3292 \end{helpglossary}
3293
3294 \addcontentsline{toc}{chapter}{Index}
3295 \setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
3296 \setfooter{\thepage}{}{}{}{}{\thepage}%
3297 \printindex%
3298
3299 \end{document}