TROFF2HTML(1)
β¨ NAME β¨
okay so bestie, this is the manual page for TROFF2HTML(1) β General Commands Manual energy β and the command is troff2html, which does exactly one iconic thing: convert troff output into HTML. π
β¨
πΈ SYNOPSIS πΈ
-t titleβ this is the only flag-shaped thing in the synopsis, and the page does not give extra deets about it. Itβs just sitting there, mysterious, serving main character energy. πfile ...β the files to read. If you donβt name any, it defaults to standard input β yes, that part is in DESCRIPTION, but itβs still a whole vibe.
π DESCRIPTION π
troff2html reads the troff(1) output in the named files β default standard input β and converts them into HTML. literally thatβs the whole job. π«Ά
troff2html does a tolerable job with straight troff output, but it is helped by annotations, described below. (yes, βtolerableβ is the actual word, no cap.) Its main use is for man2html (see Plan 9's httpd(8)), which converts man(1) pages into HTML and depends on a specially annotated set of man(7) macros, invoked by troff -manhtml. π₯
Troff output lines beginning
x X html ...
which are introduced by placing \X'html ...' in the input, cause the rest of the line to be interpolated into the HTML produced. Several such lines are recognized specially by troff2html. The most important are the pair
x X html manref start cp 1
x X html manref end cp 1
which are used to create HTML hyperlinks around text of the form cp(1) pointing to /magic/man2html/1/cp. πͺ
troff2html is new and experimental; in time, it may improve and subsume Plan 9's ms2html(1). On the one hand, because it uses the input, ms2html can handle pic(1), eqn(1), etc., which troff2html does not handle at all; on the other hand, ms2html understands only ms(7) documents and is easily confused by complex troff constructions. troff2html has the reverse properties: it does not handle the preprocessors but its output is reliable and (modulo helper annotations) is independent of macro package. πβ¨
π SEE ALSO π
π¦ BUGS π¦
Troff and HTML have different models, and they donβt mesh well in all cases. Troff's indented paragraphs are not well served in HTML, and the output of troff2html shows this. π
okay thatβs the page, bestie. sign-off time: TROFF2HTML(1) β the footer is just the manual tag, with no date or version line to report. stay slay π
π
π¦ 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