troffcvt converts troff input into an intermediate form that is easier to interpret than raw troff
language. This intermediate form can then be used by postprocessors like tc2html or tc2rtf to produce
final output in a target format such as HTML or RTF.
troffcvt understands the options listed below. Except as noted, options must be specified before the
first input file named on the command line.
-A Normally, troffcvt reads the default action file before reading any action or macro files named on
the command line using the -a or -m options. If -A is specified, troffcvt doesn't read the
default action file. This option is rarely used, but it can be helpful when you want to try out a
modified default file.
-afile,-afile
Read the given action file. -a may also be specified in the input file part of the argument list.
-C Turn on groff-style compatibility mode. Specifically, this option disables recognition of long (>
2 character) request and macro names, and special character, register, string, font, and macro
argument references of the forms \[xxx], \n[xxx], \*[xxx], \f[xxx], and \$[nnn].
If -C is specified, compatibility mode is turned on when the first input file is about to be read.
(Macro packages specified with -m may turn on compatibility mode themselves, of course. However,
compatibility mode is always turned off while action files are read.)
-dN,-dN
Turn on debugging flag N. The flags are listed in troffcvt.h. If -d is not followed by a number,
all flags are turned on.
-l Generate \line controls in the output to indicate the point at which each input line was read.
These controls have the following form:
\line filenamelinenumber
where filename is the current input filename and linenumber is the current input line in that file.
-mxx Read the given macro package (e.g., -man, -ms) before the input files are read.
-rN,-rN
Specify a resolution of N units per inch. The default is 432 units/inch.
-tformatter-type,-tformatter-type
Specify a formatter type that troffcvt should try to act like. Valid formatter-type values are:
nroff Act like nrofftroff Act like troff
This option has little effect on troffcvt's behavior other than to determine the result of the .ift and .ifn conditionals.
troffcvt finds action files by looking in the following locations:
• The current directory.
• The troffcvt library directory, /usr/share/troffcvt.
troffcvt finds macro packages by looking in the following locations:
• The directories named by the TROFFCVT_TMAC_PATH environment variable, if that variable is set.
TROFFCVT_TMAC_PATH consists of one or more directories, separated by colons.
• The directory named by the TROFFCVT_LIB_DIR environment variable, if that variable is set.
• The current directory.
• The compiled-in troffcvt library directory /usr/share/troffcvt. This allows you to override a
system macro package by placing a different version in the troffcvt library.
• The system macro directory (e.g., /usr/lib/tmac or /usr/share/groff/tmac).
Macro and action files specified with -m and -a prior to the first input file are processed in order
before the first input file is read. Once the initial options have been read and processed, troffcvt
reads the input files, or the standard input if no files are read. The name - may be used to refer
explicitly to the standard input. -a may be used to intersperse action files with input files in this
part of the argument list. For example:
% troffcvt -ms mymacros -a tc.mymacros mydoc