groff_www(7)
β¨ NAME β¨
groff_www β GNU roff macros for authoring web pages πΈοΈπ
(also hi, this is from the Miscellaneous Information Manual, which is giving very "odds and ends drawer but make it chic" energy π)
πΈ SYNOPSIS πΈ
groff -m www [option ...] [file ...]
π¦ DESCRIPTION π¦
Okay bestie, so this is the manual page for the GNU www macro package, which is literally part of the groff(7) document formatting system. Iconic. π
Here's the tea: this macro file gets loaded automatically by the default troffrc file whenever the formatter (usually groff(1)) is called with either of the options -T html or -T xhtml. No cap, it just shows up. β¨
Heads up though: the HTML output driver grohtml(1) is in a beta state. groff distributes these macros to encourage its testing β so like, please test it, that's the whole point π«Ά
Here's the full macro cast list, main-character energy only:
JOBNAMEβ split output into multiple filesHXβ automatic heading level cut-offBCLβ specify colours on a web pageBGIMGβ specify background imageURLβ create a URL using two parametersMTOβ create an HTML email addressTAGβ generate an HTML nameIMGβ include an image filePIMGβ include PNG imageMPIMGβ place PNG on the margin and wrap text around itHnSβ begin headingHnEβ end headingLKβ emit automatically collected linksHRβ produce a horizontal ruleNHRβ suppress automatic generation of rulesHTLβ record document title as HTML metadata onlyHEADβ add data to<head>blockULSβ unordered list beginULEβ unordered list endOLSβ ordered list beginOLEβ ordered list endDLSβ definition list beginDLEβ definition list endLIβ insert a list itemDCβ generate a drop capitalHTMLβ transmit raw HTML to output driverCDSβ code example beginCDEβ code example endALNβ place links on left of main textLNSβ start two-column table with links on the leftLNEβ end two-column table started with.LNSLINKSTYLEβ initialize default URL attributes
π MACROS π
π JOBNAME file-name-stem
Split output into multiple HTML files. In ms documents, a file is split whenever an .SH or .NH 1 call is encountered. Its argument is the file name stem used for output files. This option is equivalent to grohtml's -j option. Slay, file splitting unlocked βοΈβ¨
π HX n
Set the section heading level above which grohtml is not to automatically generate links to n. Example time: when used with the groff_ms(7) package, .HX 2 causes grohtml to generate a list of links for ms macro calls .NH 1 and .NH 2 but not for .NH 3 β whereas .HX 0 generates no hyperlinks to section headings at all. And if you give groff the option -P -l, that disables automatic heading linkage entirely. iykyk π―
π BCL foreground background active not-visited visited
Configure the colours used for page foreground, page background, active hypertext link, hypertext links not yet visited, and visited hypertext links. Five slots, all the aesthetics π¨
π BGIMG file
Set the background image to file. Vibe check: passed π
π URL url [link-text [post]]
Generate a hyperlink to url with optional link-text followed immediately by non-linked text post.
If link-text is absent, url is formatted as the link text. Hyphenation is disabled while formatting a URL β so insert explicit break points with the \: escape sequence. Literally do not forget this one π
π MTO address [link-text [post]]
Generate an email hyperlink to address with optional link-text followed immediately by non-linked text post.
If link-text is absent, address is formatted as the link text. Hyphenation is disabled while formatting a URL β again, insert explicit break points with the \: escape sequence. Same rules, email edition π§π
π TAG name
Generate an anchor name marking its location in the document as a target for hyperlinks. It's giving "you are here" but make it HTML π
π IMG file-name [-C|-L|-R] [width [height]]
Insert graphical image file-name. The optional second argument aligns the image to the center (-C, the default), left (-L), or right (-R). The optional width defaults to 100 units (in the context of the HTML renderer) and the optional height to the same measurement as width. Center is the default, so no pressure πΌοΈ
π PIMG [-C|-L|-R] file-name [width [height]]
Insert graphical image file-name, assumed to be in PNG format. Compared to IMG, this macro has the advantage of working with both PostScript and HTML devices, since it converts file-name into EPS format using pngtopnm(1), pnmcrop(1), and pnmtops(1). Bestie it does the whole pipeline for you, obsessed π
height and width may be given as percentages (of the line length \n[.l] and page length \n[.p], respectively).
Real talk: if the document isn't processed with-T htmlor-T xhtml, you must usegroff(1)'s-Uoption. Not optional. Not a suggestion. π¨
π MPIMG [-L|-R] [-G gap] file-name [width [height]]
As PIMG, but place the image at a margin and wrap text around it. The image is aligned to the left (-L, default) or right (-R) margin. -G gap imposes horizontal space of gap pixels between the picture and the text that wraps around it. The default gap is zero. Text-wrapping around a PNG? That's main character behavior, fr fr π¦
π HnS n
Begin heading at level n. Go off, heading π
π HnE
End heading text. That's a wrap π¬
π LK
Direct grohtml to emit the list of automatically generated hyperlinks at this location. You pick the spot, it drops the links π«Ά
π HR
Generate a full-width horizontal rule when used with -T html or -T xhtml. A little divider of your very own β
π NHR
Suppress the horizontal rules at the document's top and bottom that grohtml emits by default. Sometimes less is more, lowkey π«
π HTL
Generate an HTML title only. This differs from groff_ms(7)'s TL macro, which generates both an HTML title and an <H1> heading. Use it to provide an HTML title as document metadata but not as formatted text. The title ends when vertical space (.sp) or a break (.br) is seen. Metadata title only, zero formatting drama β¨
π HEAD
Add arbitrary data to the HTML <head> element. Ignored if not processed with -T html or -T xhtml. Your <head> your rules π
π HTML
All text after this macro is treated as raw HTML. Ignored if not processed with -T html or -T xhtml. Raw HTML, no filter, straight through β chaotic and I respect it π
π DC L text [color]
Format a "drop cap" β a large character L (usually a capital letter) at a larger size and with a lower text baseline than the following text, such that the cap-heights of L and text align, in the specified color (default: black). Very fairy-tale-chapter-opening of you π§π
π CDS
Begin code display; a monospaced font is selected and filling is disabled. Code mode: activated π»
π CDE
End code display. Code mode: deactivated, we're back β¨
π ALN [color [width-percentage]]
Enable a "navigation pane" containing links to section headings, aligned to the left of running text, and configure its rendering parameters. Columnation is achieved with an HTML table. color indicates an HTML background color to be used in the navigation column; the default is #eeeeee. width-percentage allocates the given percentage of the navigation pane's table column; the default is 30.
Call this macro at most once, at the beginning of the document. Seriously, once. Not twice, bestie π
π LNS
Begin text indexed by the navigation pane configured by ALN. Let the nav do its thing π§
π LNE
End text indexed by navigation pane started by LNS. Nav text: closed out π
π LINKSTYLE color [font-style [open-glyph close-glyph]]
Configure rendering of formatted hyperlink targets for devices other than html and xhtml; render targets in color (default: blue) using the typeface font-style (default: CR) bracketed with open-glyph and close-glyph (defaults: \[la] and \[ra], respectively). Zebra-striping your links, I see you π
π§ SECTION HEADING LINKS π§
By default, grohtml generates links to all section headings and places these at the top of the HTML document. Configure this behavior with HX and/or LK. Your page, your navigation, your rules β
π LIMITATIONS OF GROHTML π
Okay, real talk time. Here's what grohtml can't do (yet):
tbl(1)tables are rendered as PNG images. Yeah. Images. Of tables. π- All URLs currently are treated as consuming no textual space in groff. This could be considered as a bug since it causes some problems. To circumvent this,
www.tmacinserts a zero-width character which expands to a harmless space (only if run with-Thtmlor-Txhtml). Sneaky little workaround, we love a hack π«Ά - Some of the macros, like
ALN,LNS, andLNE, are integrated only with thegroff_ms(7)package. ms girlies only for those π
π FILES π
/usr/share/groff/1.24.2/tmac/www.tmac
That's the file, right there, in all its glory β¨
π AUTHORS π
The www macro package was written by Gaius Mulley, with additions by Werner Lemberg and Bernd Warken. Legends, all of them π
π¦ SEE ALSO π¦
Go read them, bestie, they're literally right there ππ
okay that's the whole page, mwah π β this was groff 1.24.2, dated 2026-10-01, from the groff_www(7) page. Now go build a web page with roff like the absolute icon you are πβ¨
π¦ where this page comes from
- alpine 3.24: groff-doc 1.24.2-r0 Β· GPL-3.0-or-later
- Copyright 2000-2020 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