TROFF(1plan9)
π TROFF β bestie edition π
okay so you found the Plan 9 manual, section 1, and the star of the show is troff π (with its little sibling nroff tagging along). sit down, grab a boba, we're learning typesetting.
β¨ NAME β¨
troff, nroff β text formatting and typesetting π¦
β¨ SYNOPSIS β¨
troff [ option ... ] [ file ... ]
nroff [ option ... ] [ file ... ]
β¨ DESCRIPTION β¨
So troff formats text in the named files for printing on a typesetter. nroff does literally the same thing, except its output is suitable for typewriter-like devices. Same energy, different fit π
If you don't hand it any file argument at all? It reads standard input. And if you pass an argument that's just a single minus (-), that counts as a file name meaning standard input too. Noted π
The options are:
-olistβ print pages in the comma-separated list of numbers and ranges. A range N-M means N through M; an initial-Mmeans up to M; a finalN-means from N to the end. ranges slay β¨-nNβ number the first generated page N.-mnameβ process the macro file/usr/share/9base/troff/tmac/tmac.namebefore the input files.-raNβ set register a (a one character name, bestie) to N.-iβ read standard input after the input files are exhausted.-qβ invoke the simultaneous input-output mode of therdrequest.-Nβ produce output suitable for typewriter-like devices.
π¨οΈ Typesetter devices (not -N) only
these ones are ONLY for typesetter devices, meaning not when you used -N. read the room π«Ά
-aβ send a printable textual approximation of the results to the standard output.-Tdestβ prepare output for typesetter dest:-Tutfβ (the default.) PostScript printers with preprocessing to handle Unicode characters encoded in UTF π-Tpostβ regular PostScript printers-T202β Mergenthaler Linotron 202
-Fdirβ take font information from directory dir.
β¨οΈ Typewriter (-N) output only
and these ones are the opposite β only for typewriter (-N) output. the duality π
-sNβ halt prior to every N pages (default N=1) to allow paper loading or changing. very much giving "brb gotta feed the printer" π§-Tnameβ prepare output for specified terminal. Known names includeutffor the normal Plan 9 UTF encoding of the Unicode Standard character set (default),37for the Teletype model 37,lp(line-printer) for any terminal without half-line capability,450for the DASI-450 (Diablo Hyterm), andthink(HP ThinkJet). a whole roster π-eβ produce equally-spaced words in adjusted lines, using full terminal resolution.-hβ use output tabs during horizontal spacing to speed output and reduce output character count. Tab settings are assumed to be every 8 nominal character widths.
πΈ FILES πΈ
/tmp/trtmp*β temporary file/tmac/tmac.*β standard macro files/troff/term/*β terminal driving tables fornroff/troff/font/*β font width tables fortroff
π SOURCE π
/src/cmd/troff
π SEE ALSO π
lpr(1),proof(1),tr2post(1),eqn(1),tbl(1),pic(1),grap(1),doctype(1),ms(7),image(7),tex(1),deroff(1)- J. F. Ossanna and B. W. Kernighan, ``Troff User's Manual''
- B. W. Kernighan, ``A TROFF Tutorial'', Unix Research System Programmer's Manual, Tenth Edition, Volume 2.
π and that's the whole page, bestie. no cap, we got every single flag.
okay so final vibe check: this whole thing lives in the TROFF(1plan9) corner of the Plan 9 manual, section 1, and yeah the page header and footer both just say TROFF(1plan9) at you, twice, like a lil echo π go forth and format, you absolute icon βπ
π¦ where this page comes from
- debian bookworm: 9base 1:6-13 Β· Lucent
- debian trixie: 9base 1:6-14 Β· Lucent
- ubuntu jammy: 9base 1:6-11 Β· Lucent
- ubuntu noble: 9base 1:6-14 Β· Lucent
- ubuntu questing: 9base 1:6-15
- ubuntu resolute: 9base 1:6-15build1 Β· Lucent
- ubuntu stonking: 9base 1:6-15build1 Β· Lucent
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms