HTMLROFF(1)
π NAME π
htmlroff β HTML formatting and typesetting, bestie. She's from the General Commands Manual, and she is literally here to take your troff vibes and make them browser-ready. Periodt.
β¨ SYNOPSIS β¨
htmlroff [ -iuv ] [ -m name ] [ -r aN ] [ file ... ]
That's the whole invocation, no cap. π
πΈ DESCRIPTION πΈ
Okay so htmlroff accepts troff(1) input in the named files and formats it as HTML for viewing in a web browser. It's giving "roff goes web" and honestly? Iconic.
If no file argument is given, htmlroff reads the standard input. An argument consisting of a single minus (-) is taken to be a file name corresponding to the standard input. We love a flexible stdin moment. π
The options are:
-iβ Read standard input after the input files are exhausted. So she keeps reading after the named files run out, bestie.-mnameβ Process the macro file/tmac/tmac.namebefore the input files. Note the synopsis spells it-m name, but the option label is exactly-mname.-raNβ Set register a (one character name) to N. Yep, the synopsis shows-r aN, and the option is exactly-raN.-uβ Generate UTF output. By default,htmlroffconverts Unicode runes into the corresponding HTML entity sequences (α, , and so on).htmlroffinvokestcs(1)for the conversion. Cute little entity factory, fr fr.-vβ Generate debugging output and warnings about suspicious input. Messy input? She will absolutely tell you. π
Most troff input files, especially those using the ms(7) macros, can be used unaltered. In general, the macro file tmac.html should be processed after processing other standard macro files, as in htmlroff -ms -mhtml. That ordering is the moment β process tmac.html after the other standard macro files, okay? π«Ά
htmlroff(7) describes the changes to the input language.
mhtml(7) describes the new macros.
π EXAMPLES π
Format the Plan 9 web page:
cd /usr/web/plan9
htmlroff -mhtml index.tr >index.html
Format a paper:
cd /sys/doc
pic auth.ms | tbl | eqn | htmlroff -ms -mhtml >auth.html
Pipeline girlies, rise. The pic auth.ms | tbl | eqn | htmlroff -ms -mhtml >auth.html line is a whole main-character moment. π₯
π¦ FILES π¦
/troff/font/devutf/utfmapβ Mapping from troff two-character names like\(*ato Unicode characters like Ξ±. Translation station, but make it typography. β¨
π SOURCE π
/src/cmd/htmlroffβ the source, periodt. That's where this cutie lives. π
π SEE ALSO π
okay that's the whole HTMLROFF(1) tea from the General Commands Manual β the footer is just the HTMLROFF(1) tag, with no extra source/version/date line beyond that, so that's the entire stack. mwah ππ
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms