TROFFCVT(1)

πŸ“¦
version 1.04 Β· 2 versions
, in debian bookworm, ubuntu noble

✨ 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, troffcvt reads the default action file before reading any action or macro files named on the command line with the -a or -m options. 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. -a may 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 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 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 that troffcvt should try to act like. valid formatter-type values are:
    • nroff β€” act like nroff
    • troff β€” 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 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

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 β€” troffcvt library 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