Copyright (C) 2000-2012 |
GNU Info (groff)Troff and Nroff ModeTroff and Nroff Mode ==================== 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'. - Request: .troff Make the `t' built-in condition true (and the `n' built-in condition false) for `if', `ie', and `while' conditional requests. This is the default if `gtroff' (_not_ `groff') is started with the `-R' switch to avoid loading of the start-up files `troffrc' and `troffrc-end'. Without `-R', `gtroff' stays in troff mode if the output device is not a tty (e.g. `ps'). - Request: .nroff Make the `n' built-in condition true (and the `t' built-in condition false) for `if', `ie', and `while' conditional requests. This is the default if `gtroff' uses a tty output device; the code for switching to nroff mode is in the file `tty.tmac' which is loaded by the start-up file `troffrc'. Note: Conditionals and Loops, for more details on built-in conditions. For tty output devices, underlining is done by emitting sequences of `_' and `\b' (the backspace character) before the actual character. Literally, this is printing an underline character, then moving back one character position, and printing the actual character at the same position as the underline character (similar to a typewriter). Usually, a modern terminal can't interpret this (and the original Teletype machines for which this sequence was appropriate are no longer in use). You need a pager program like `less' which translates this into ISO 6429 SGR sequences to control terminals. automatically generated by info2www version 1.2.2.9 |