TROFFCVT(1)
β¨ TROFFCVT(1) β¨
okay bestie, gather round, it's the General Commands Manual and we're doing a whole deep dive on troffcvt π
no cap.
NAME
troffcvt β the troff-to-XXX converter π¦ (yes literally any XXX, she's flexible like that)
SYNTAX
troffcvt [ options ] file ...
DESCRIPTION
so like, troffcvt takes troff input and turns it into an intermediate form that's way easier to interpret than raw troff language πΈ. then that intermediate form gets handed off to postprocessors like tc2html or tc2rtf so you can get your final output in whatever target format you're feeling β HTML, RTF, whatever, main character energy π.
troffcvt understands all the options listed below, mwah. Except as noted, options must be specified before the first input file named on the command line. periodt.
-Aβ normally,troffcvtreads the default action file before reading any action or macro files named on the command line with the-aor-moptions. if you pass-A, she skips the default action file entirely. this one is rarely used, but it's lowkey helpful when you want to try out a modified default file π.-afile,-a fileβ read the given action file.-amay also be specified in the input file part of the argument list, iykyk.-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,-d Nβ turn on debugging flag N. the flags are listed introffcvt.h. if-dis not followed by a number, all flags are turned on π.-lβ generate\linecontrols in the output to indicate the point at which each input line was read. these controls have the following form:
\line filename linenumber
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,-r Nβ specify a resolution of N units per inch. the default is 432 units/inch.-tformatter-type,-t formatter-typeβ specify a formatter type thattroffcvtshould 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 .if t and .if n conditionals π§.
troffcvt finds action files by looking in the following locations:
- The current directory.
- The
troffcvtlibrary directory,/usr/share/troffcvt.
troffcvt finds macro packages by looking in the following locations:
- The directories named by the
TROFFCVT_TMAC_PATHenvironment variable, if that variable is set.TROFFCVT_TMAC_PATHconsists of one or more directories, separated by colons. - The directory named by the
TROFFCVT_LIB_DIRenvironment variable, if that variable is set. - The current directory.
- The compiled-in
troffcvtlibrary directory/usr/share/troffcvt. this allows you to override a system macro package by placing a different version in thetroffcvtlibrary π. - The system macro directory (e.g.,
/usr/lib/tmacor/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
slay π«Ά
DIAGNOSTICS
if troffcvt cannot open a macro file, you will see this message:
cannot open macro file -mxx
this message is fatal π.
if troffcvt cannot open an action file, you will see this message:
cannot open action file <xx>
this message usually indicates a problem, but is not fatal (except for the default action file actions, which must be available for troffcvt to do anything at all π). if you still get reasonable output, you can ignore it. to make the message go away, create an empty file named xx in any of the directories in which troffcvt looks for action files. if you don't get reasonable output, then a non-empty file needs to be created that redefines the macros that confuse troffcvt.
FILES
/usr/share/troffcvtβtroffcvtlibrary directory
WHO-TO-BLAME
Paul DuBois, dubois@primate.wisc.edu. π
SEE ALSO
tc2html(1), tc2rtf(1), tc2text(1), troff2html(1), troff2rtf(1), unroff(1).
troffcvt - Notes, Bugs, Deficiencies.
BUGS
there are many. see the document troffcvt - Notes, Bugs, Deficiencies. π
and that's the whole page bestie, we ate and left no crumbs πβ¨ this was TROFFCVT(1) from the General Commands Manual, so go forth and convert, ily, bye ππ¦πΈ
π¦ where this page comes from
- debian bookworm: troffcvt 1.04+repack1-1
- ubuntu noble: troffcvt 1.04+repack1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms