Originally, nroff and troff were two separate programs,
the former for TTY output, the latter for everything else. With GNU
troff, both programs are merged into one executable, sending its
output to a device driver (grotty for TTY devices, grops
for PostScript, etc.) which interprets the intermediate output of
gtroff. For UNIX troff it makes sense to talk
about Nroff mode and Troff mode since the differences are
hardcoded. For GNU troff, this distinction is not appropriate
because gtroff simply takes the information given in the font
files for a particular device without handling requests specially if a
TTY output device is used.
Usually, a macro package can be used with all output devices.
Nevertheless, it is sometimes necessary to make a distinction between
TTY and non-TTY devices: gtroff provides two built-in conditions
‘n’ and ‘t’ for the if, ie, and while
requests to decide whether gtroff shall behave like nroff
or like troff.
Make the ‘t’ built-in condition true (and the ‘n’ built-in condition false) for
if,ie, andwhileconditional requests. This is the default ifgtroff(notgroff) is started with the -R switch to avoid loading of the start-up files troffrc and troffrc-end. Without -R,gtroffstays in troff mode if the output device is not a TTY (e.g. `ps').
Make the ‘n’ built-in condition true (and the ‘t’ built-in condition false) for
if,ie, andwhileconditional requests. This is the default ifgtroffuses a TTY output device; the code for switching to nroff mode is in the file tty.tmac which is loaded by the start-up filetroffrc.
See Conditionals and Loops, for more details on built-in conditions.