grohtml(1)

πŸ’– grohtml πŸ’–

okay bestie, gather round, because this is a General Commands Manual entry and it's about to be your new fave. we're talking grohtml, plus its two little sidekicks post-grohtml and pre-grohtml β€” the groff output driver for HTML. yes, the one that turns your dusty roff docs into actual web pages. slay. πŸ¦‹


✨ NAME ✨

grohtml, post-grohtml, pre-grohtml β€” groff output driver for HTML


🌸 SYNOPSIS 🌸

pre-grohtml [-epV] [-a anti-aliasing-text-bits] [-D image-directory]
            [-F font-directory] [-g anti-aliasing-graphic-bits]
            [-i resolution] [-I image-stem] [-o image-vertical-offset]
            [-x html-dialect] troff-command troff-argument ...

pre-grohtml --help

pre-grohtml -v

pre-grohtml --version
post-grohtml [-bCGhlnrVy] [-F font-directory] [-j output-stem]
             [-k encoding] [-s base-point-size] [-S heading-level]
             [-x html-dialect] [file ...]

post-grohtml --help

post-grohtml -v

post-grohtml --version

πŸ‘‘ DESCRIPTION πŸ‘‘

so, the GNU roff system's HTML support? it's a whole two-person operation, no cap: a preprocessor called pre-grohtml, and an output driver called post-grohtml. together they translate roff(7) documents to HTML. dynamic duo energy, honestly. πŸ’…

here's the tea tho: because a preprocessor is (uniquely) required for this output driver, you should not be calling grohtml directly like some kind of chaotic gremlin. invoke it via groff(1) with the -Thtml or -Txhtml options. periodt. (in this installation, ps is the default output device, just so you know.) wanna pass any of the options listed below down to grohtml? use groff's -P option. easy.

if no operands are given, or if file is -, grohtml reads the standard input stream. and it writes to the standard output stream, as one does. 🫢

also, plot twist: grohtml invokes groff twice. iconic, honestly.

  1. first pass β€” the preprocessor pre-grohtml renders pictures, equations, and tables as images in PostScript format using the ps output device.
  2. second pass β€” the output driver post-grohtml translates the output of troff(1) to HTML.

grohtml writes UTF-8-encoded output (but see the -k option, bestie, don't come for me) and produces HTML character references for most non-composite, non-basic Latin Unicode characters. and in spite of this, groff may still issue warnings about unknown special characters if they can't be found during the first pass. you can ignore those warnings… unless the special characters appear inside a table or equation. then it's real. 😭


πŸ’œ Typefaces πŸ’œ

grohtml supports the standard four styles: R (roman), I (italic), B (bold), and BI (bold-italic). fonts are grouped into families T and C, having members in each style. the whole squad:

  • TR β€” Times roman
  • TI β€” Times italic
  • TB β€” Times bold
  • TBI β€” Times bold-italic
  • CR β€” Courier roman
  • CI β€” Courier italic
  • CB β€” Courier bold
  • CBI β€” Courier bold-italic

a special font, S, is also provided to accommodate roff documents that expect it to always be available. she's always there for you. πŸ’–

grohtml furthermore supports a naming scheme for East Asian typefaces shared with gropdf(1), grops(1), and grotty(1). look at them sharing, we love to see it:

  • CSH β€” Simplified Chinese, Hei style
  • CSS β€” Simplified Chinese, Song style
  • CTH β€” Traditional Chinese, Hei style
  • CTS β€” Traditional Chinese, Song style
  • JPG β€” Japanese, Gothic style
  • JPM β€” Japanese, Mincho style
  • KOG β€” Korean, Gothic style
  • KOM β€” Korean, Mincho style

πŸŽ€ Font description files πŸŽ€

the font description files used with grohtml expose the same glyph repertoire in their charset sections. see groff_font(5). that's it, that's the section. go read the other one. πŸ™ˆ


🌈 Dependencies 🌈

pre-grohtml generates an image whenever an eqn equation, tbl table, or pic picture is encountered in the input. so yeah, grohtml may run several commands as part of its operation, because it's a busy queen. these include the Netpbm tools pamcut, pnmcrop, and pnmtopng, as well as Ghostscript's gs and ps2ps.


⭐ OPTIONS ⭐

first up, the little intro trio:

--help displays a usage message, while -v and --version show version information; all of them exit afterward. bye bestie πŸ‘‹

  • -a anti-aliasing-text-bits β€” number of bits of antialiasing information to be used by text when generating PNG images. the default is 4, but 0, 1, and 2 are also valid. your system's version of gs must support the -dTextAlphaBits option in order to exploit antialiasing. a value of 0 stops grohtml from issuing antialiasing commands to gs.
  • -b β€” initialize the background color to white. clean canvas vibes. ✨
  • -C β€” suppress output of β€œCreationDate:” HTML comment.
  • -D image-directory β€” instruct grohtml to place all image files into directory image-directory.
  • -e β€” direct eqn to produce MathML.
⚠️ this option should not be manually specified; it is synthesized by groff depending on whether it was given the -Thtml or -Txhtml option. hands off, bestie. πŸ™ˆ
  • -F font-directory β€” prepend directory font-directory/devname to the search path for font and device description files; name is the name of the device, usually html.
  • -g anti-aliasing-graphic-bits β€” number of bits of antialiasing information to be used by graphics when generating PNG images. the default is 4 but 0, 1, and 2 are also valid. your system's version of gs must support the -dGraphicAlphaBits option in order to exploit antialiasing. a value of 0 stops grohtml from issuing antialiasing commands to gs.
  • -G β€” suppress output of β€œCreator:” HTML comment.
  • -h β€” generate section headings by using HTML B elements and increasing the font size, rather than HTML H elements.
  • -i resolution β€” set the image resolution in pixels per inch; the default is 100.
  • -I image-stem β€” determine the image file name stem. if omitted, grohtml uses grohtml-XXXXX (where XXXXX is the process ID). a dash is appended to the stem to separate it from the following image number.
  • -j output-stem β€” instruct grohtml to split the HTML output into multiple files. output is written to a new file at each section heading (but see option -S below) named output-stem-n.html.
  • -k encoding β€” select the character encoding used in the generated document, affecting the declared encoding in the preamble and the form of character entity references. valid values are β€œASCII” and β€œUTF-8”. the default is β€œUTF-8”.
  • -l β€” turn off the production of automatic section links at the top of the document.
  • -n β€” generate simple heading anchors whenever a section/number heading is found. without the option the anchor value is the textual heading. this can cause problems when a heading contains a β€œ?” on older versions of some browsers. this feature is automatically enabled if a heading contains an image.
  • -o image-vertical-offset β€” specify the vertical offset of images in points.
  • -p β€” display page rendering progress to the standard error stream. grohtml displays a page number only when an image is required.
  • -r β€” turn off the automatic header and footer line (HTML rule).
  • -s base-type-size β€” set the document's base type size in points. when this size is used in the source, it corresponds to the HTML base type size. every increase of two points in the source will produce a β€œbig” element, and conversely when a decrease of two points is seen, a β€œsmall” element is emitted.
  • -S heading-level β€” when splitting HTML output (see option -j above), split at each nested heading level defined by heading-level, or higher). the default is 1.
  • -V β€” create an XHTML or HTML validator button at the bottom of each page of the document. so official. βœ…
  • -x html-dialect β€” select HTML dialect. currently, html-dialect should be either the digit 4 or the letter x, which indicates whether grohtml should generate HTML 4 or XHTML, respectively.
⚠️ this option should not be manually specified; it is synthesized by groff depending on whether it was given the -Thtml or -Txhtml option. again: do not touch. it's giving "do not perceive me". πŸ’€
  • -y β€” produce a right-aligned groff signature at the end of the document (only if -V is also specified). conditional queen.

πŸ’… EXIT STATUS πŸ’…

pre-grohtml and post-grohtml each exit with status 0 on successful operation, status 2 if the program cannot interpret its command-line arguments, and status 1 if it encounters an error during operation.

so: 0 good, 2 bad args, 1 something went wrong mid-vibe. πŸ”₯


🧚 ENVIRONMENT 🧚

  • GROFF_FONT_PATH β€” lists directories in which to search for devhtml, grohtml's directory of device and font description files. see troff(1) and groff_font(5).
  • SOURCE_DATE_EPOCH β€” a timestamp (expressed as seconds since the Unix epoch) to use as the output creation timestamp in place of the current time. the time is converted to human-readable form using gmtime(3) and asctime(3), and recorded in an HTML comment.
  • TZ β€” the time zone to use when converting the current time to human-readable form; see tzset(3). if SOURCE_DATE_EPOCH is used, it is always converted to human-readable form using UTC.

πŸ“ FILES πŸ“

  • /usr/share/groff/1.24.1/font/devhtml/DESC β€” describes the html output device.
  • /usr/share/groff/1.24.1/font/devhtml/F β€” describes the font known as F on device html.
  • /usr/share/groff/1.24.1/tmac/html.tmac β€” defines font mappings, special characters, and colors for use with the html output device. it is automatically loaded by troffrc when either of the html or xhtml output devices is selected.
  • /usr/share/groff/1.24.1/tmac/html-end.tmac β€” finalizes setup of the html output device. it is automatically loaded by troffrc-end when either of the html or xhtml output devices is selected.

grohtml uses temporary files. see groff(1) for details about where such files are created.


😭 BUGS 😭

  • grohtml is still beta code. she's a work in progress, okay?? be nice to her. πŸ₯Ί
  • grohtml does not truly support hyphenation, but you can fool it into hyphenating long input lines, which can appear in HTML output with a hyphenated word followed by a space but no line break.

🌸 SEE ALSO 🌸

groff(1), troff(1), groff_font(5)


okay that's the whole page, bestie, you ate that. πŸ’–

anyway stream groff 1.24.1, dated 2026-04-22, because this grohtml(1) page is officially signed off and shipped β€” go build something gorgeous. no cap. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from