grohtml(1)
π grohtml(1) β General Commands Manual, but make it cute π
Okay so bestie, we are in the HTML-glam zone of GNU roff. This is grohtml(1), and yes, it's giving "I translate roff to HTML and I brought a preprocessor." π
π 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 π
Okay so the GNU roff system's HTML support is a two-piece situation: a preprocessor called pre-grohtml and an output driver called post-grohtml; together, they translate roff(7) documents to HTML. Because a preprocessor is (uniquely) required for this output driver, users should invoke grohtml via the groff(1) command with the -Thtml or -Txhtml options. (In this installation, ps is the default output device.) Use groff's -P option to pass any options shown above to grohtml. If no operands are given, or if file is -, grohtml reads the standard input stream. It writes to the standard output stream.
grohtml invokes groff twice. In the first pass, the preprocessor pre-grohtml renders pictures, equations, and tables as images in PostScript format using the ps output device. In the 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) and produces HTML character references for most non-composite, non-basic Latin Unicode characters. In spite of this, groff may issue warnings about unknown special characters if they can't be found during the first pass. You can ignore these warnings unless the special characters appear inside a table or equation. Like, table/equation special chars? Do not ignore those, bestie. π«Ά
π 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.
TRβ Times romanTIβ Times italicTBβ Times boldTBIβ Times bold-italicCRβ Courier romanCIβ Courier italicCBβ Courier boldCBIβ Courier bold-italic
A special font, S, is also provided to accommodate roff documents that expect it to always be available. Iconic safety-blanket font behavior, honestly. β¨
grohtml furthermore supports a naming scheme for East Asian typefaces shared with gropdf(1), grops(1), and grotty(1).
CSHβ Simplified Chinese, Hei styleCSSβ Simplified Chinese, Song styleCTHβ Traditional Chinese, Hei styleCTSβ Traditional Chinese, Song styleJPGβ Japanese, Gothic styleJPMβ Japanese, Mincho styleKOGβ Korean, Gothic styleKOMβ 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).
𧨠DEPENDENCIES π§¨
pre-grohtml generates an image whenever an eqn equation, tbl table, or pic picture is encountered in the input. grohtml therefore may run several commands as part of its operation. These include the Netpbm tools pamcut, pnmcrop, and pnmtopng, as well as Ghostscript's gs and ps2ps.
π OPTIONS π
Okay so here's the whole menu, bestie. --help displays a usage message, while -v and --version show version information; all exit afterward. β¨
--helpβ displays a usage message, then exits.-vβ shows version information, then exits.--versionβ shows version information, then exits.-aanti-aliasing-text-bits β number of bits of antialiasing information to be used by text when generating PNG images. The default is4but0,1, and2are also valid. Your system's version ofgsmust support the-dTextAlphaBitsoption in order to exploit antialiasing. A value of0stopsgrohtmlfrom issuing antialiasing commands togs.-bβ initialize the background color to white.-Cβ suppress output ofβCreationDate:βHTML comment.-Dimage-directory β instructgrohtmlto place all image files into directory image-directory.-eβ directeqnto produce MathML. This option should not be manually specified; it is synthesized bygroffdepending on whether it was given the-Thtmlor-Txhtmloption.-Ffont-directory β prepend directoryfont-directory/devnameto the search path for font and device description files; name is the name of the device, usuallyhtml.-ganti-aliasing-graphic-bits β number of bits of antialiasing information to be used by graphics when generating PNG images. The default is4but0,1, and2are also valid. Your system's version ofgsmust support the-dGraphicAlphaBitsoption in order to exploit antialiasing. A value of0stopsgrohtmlfrom issuing antialiasing commands togs.-Gβ suppress output ofβCreator:βHTML comment.-hβ generate section headings by using HTMLBelements and increasing the font size, rather than HTMLHelements.-iresolution β set the image resolution in pixels per inch; the default is100.-Iimage-stem β determine the image file name stem. If omitted,grohtmlusesgrohtml-XXXXX(whereXXXXXis the process ID). A dash is appended to the stem to separate it from the following image number.-joutput-stem β instructgrohtmlto split the HTML output into multiple files. Output is written to a new file at each section heading (but see option-Sbelow) namedoutput-stem-n.html.-kencoding β 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 areASCIIandUTF-8. The default isUTF-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.-oimage-vertical-offset β specify the vertical offset of images in points.-pβ display page rendering progress to the standard error stream.grohtmldisplays a page number only when an image is required.-rβ turn off the automatic header and footer line (HTML rule).-sbase-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.-Sheading-level β when splitting HTML output (see option-jabove), split at each nested heading level defined by heading-level, or higher). The default is1.-Vβ create an XHTML or HTML validator button at the bottom of each page of the document.-xhtml-dialect β select HTML dialect. Currently, html-dialect should be either the digit4or the letterx, which indicates whethergrohtmlshould generate HTML 4 or XHTML, respectively. This option should not be manually specified; it is synthesized bygroffdepending on whether it was given the-Thtmlor-Txhtmloption.-yβ produce a right-aligned groff signature at the end of the document (only if-Vis also specified).
π¦ 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.
π± ENVIRONMENT π±
GROFF_FONT_PATHβ lists directories in which to search fordevhtml,grohtml's directory of device and font description files. Seetroff(1)andgroff_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 usinggmtime(3)andasctime(3), and recorded in an HTML comment.TZβ the time zone to use when converting the current time to human-readable form; seetzset(3). IfSOURCE_DATE_EPOCHis used, it is always converted to human-readable form using UTC.
π FILES π
/usr/share/groff/1.24.2/font/devhtml/DESCβ describes thehtmloutput device./usr/share/groff/1.24.2/font/devhtml/Fβ describes the font known as F on devicehtml./usr/share/groff/1.24.2/tmac/html.tmacβ defines font mappings, special characters, and colors for use with thehtmloutput device. It is automatically loaded bytroffrcwhen either of thehtmlorxhtmloutput devices is selected./usr/share/groff/1.24.2/tmac/html-end.tmacβ finalizes setup of thehtmloutput device. It is automatically loaded bytroffrc-endwhen either of thehtmlorxhtmloutput devices is selected.
grohtml uses temporary files. See groff(1) for details about where such files are created.
π BUGS π
grohtml is still beta code. Beta code era, no cap. π«
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)
Signed with love by groff 1.24.2, dated 2026-10-01 β this grohtml(1) page is officially out. π
β¨
π¦ where this page comes from
- alpine 3.24: groff-doc 1.24.2-r0 Β· GPL-3.0-or-later
- Copyright (C) 1999-2024 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms