groff_man(7)
okay so this is groff_man โ the GNU man macro package, straight out of the Miscellaneous Information Manual โ and she is literally the blueprint for every man page you've ever skimmed at 2am ๐ซถ buckle up bestie ๐
๐ธ NAME ๐ธ
groff_manโ compose manual pages with GNU roff โจ
๐ฆ SYNOPSIS ๐ฆ
groff -man [option ...] [file ...]
groff -m man [option ...] [file ...]
๐ DESCRIPTION ๐
The GNU implementation of the man macro package is part of the groff document formatting system ๐ it's what composes manual pages ("man pages") โ like the exact one you're reading right now, meta much? This document presents the macros thematically; and for anyone who just needs a quick reference, the alphabetical list below has got you, with pointers to the right subsections ๐
If you're not already an experienced groff user, lowkey go read groff_man_style(7) โ it's an expanded version of this document with extra explanations and advice. Heads up though: it only covers the concepts you need for man page document maintenance, not the full breadth of the groff typesetting system ๐ฆ
Here's the whole squad, alphabetical, no cap:
.Bโ Bold โ Font style macros.BIโ Bold, italic alternating โ Font style macros.BRโ Bold, roman alternating โ Font style macros.EEโ Example end โ Document structure macros.EXโ Example begin โ Document structure macros.HPโ Begin hanging paragraph โ Paragraphing macros.Iโ Italic โ Font style macros.IBโ Italic, bold alternating โ Font style macros.IPโ Indented paragraph โ Paragraphing macros.IRโ Italic, roman alternating โ Font style macros.LPโ Begin paragraph โ Paragraphing macros.MEโ Mail-to end โ Hyperlink macros.MRโ Man page cross reference โ Hyperlink macros.MTโ Mail-to start โ Hyperlink macros.Pโ Begin paragraph โ Paragraphing macros.PPโ Begin paragraph โ Paragraphing macros.RBโ Roman, bold alternating โ Font style macros.REโ Relative inset end โ Document structure macros.RIโ Roman, italic alternating โ Font style macros.RSโ Relative inset start โ Document structure macros.SHโ Section heading โ Document structure macros.SMโ Small โ Font style macros.SSโ Subsection heading โ Document structure macros.SYโ Synopsis start โ Synopsis macros.THโ Title heading โ Document structure macros.TPโ Tagged paragraph โ Paragraphing macros.TQโ Supplemental paragraph tag โ Paragraphing macros.UEโ URI end โ Hyperlink macros.URโ URI start โ Hyperlink macros.YSโ Synopsis end โ Synopsis macros
There are also some other macros (AT, DT, OP, PD, SB, and UC) โ we gossip about those in the subsection "Deprecated features" below ๐
And a lil terminology moment: throughout Unix documentation, a manual entry is referred to simply as a "man page", no matter how long it is, without gendered implication, and regardless of which macro package was picked to compose it ๐
๐ Macro reference preliminaries ๐
A tagged paragraph describes each macro. We present coupled pairs together, as with EX and EE. If you need an empty macro argument, specify it as a pair of neutral double quotes (""). Most macro arguments are formatted as text in the output; exceptions are noted ๐
๐ Document structure macros ๐
Document structure macros organize a man page's content, and all of them break the output line. TH (title heading) identifies the document as a man page and configures the page headers and footers. Section headings (SH) โ one of which is mandatory and many of which are conventionally expected โ help the reader find stuff and help the writer cover all the essential aspects of the topic. Subsection headings (SS) are optional and let long sections develop in a controlled way. Many technical discussions benefit from examples; lengthy ones, especially those reflecting multiple lines of input to or output from the system, are usefully bracketed by EX and EE. And when none of the above meets a structural demand, use RS/RE to inset a region within a (sub)section ๐
.THโidentifier section [footer-middle [footer-inside [header-middle]]]โ Break the page, reset the page number to 1 (unless the-rC1option is given), and use the arguments to populate the page header and footer. Together,identifierand thesectionof the manual it belongs to can uniquely identify a man document on the system โ seeman(1)orintro(1)for the manual sectioning that applies to your system.identifierandsectionsit at the left and right in the header; the latter is set after the former, in parentheses and with no space.footer-middleis centered in the footer. By default,footer-insideis positioned at the bottom left. Using the double-sided layout option-rD1placesfooter-insideat the bottom left on recto (odd-numbered) pages, and the bottom right on verso (even-numbered) pages. By default, the outside footer is the page number; using the continuous-rendering option-rcR=1replaces it withidentifierandsection, like in the header.header-middleis centered in the header. Ifsectionis an integer between 1 and 9 (inclusive), you don't need to specifyheader-middleโan.tmacsupplies text for it. Ifidentifierorfooter-insidewould overrun the space available in the header and/or footer, this package may abbreviate them with ellipses. And groff man suppresses headers and footers in HTML output, periodt.
A valid man document calls TH only once, early in the file, prior to any other macro calls. Not me letting you call it twice โ don't ๐
.SHโ[heading-text]โ Setheading-textas a section heading. Given no argument,SHplants a one-line input trap; the text on the next line becomesheading-text. The heading text is set in bold (or the font specified by the stringHF), and, on typesetters, slightly larger than the base type size. If the heading font\*[HF]is bold, use of an italic style inheading-textis mapped to the bold-italic style if available in the font family. The inset level is reset to 1; see subsection "Horizontal and vertical spacing" below. Text lines after the call are set as an ordinary paragraph (P).
The content of heading-text and the ordering of sections follow a set of common practices, and so does much of the layout of material within sections. For example, a section called "Name" or "NAME" must exist, must be the first section after the TH call, and must contain only text of the form
topic[, another-topic]... \- summary-description
so that tools like makewhatis(8) or mandb(8) can index them ๐
.SSโ[subheading-text]โ Setsubheading-textas a subsection heading indented between a section heading and an ordinary paragraph (P). Given no argument,SSplants a one-line input trap; the text on the next line becomessubheading-text. The subheading text is set in bold (or the font specified by the stringHF). If the heading font\*[HF]is bold, use of an italic style insubheading-textis mapped to the bold-italic style if available in the font family. The inset level is reset to 1; see subsection "Horizontal and vertical spacing" below. Text lines after the call are set as an ordinary paragraph (P) โจ.EX,.EEโ Begin and end example. AfterEX, filling is disabled (and, on typesetters, a monospaced font family is selected). CallingEEenables filling (and restores the previous family) ๐
History moment, iykyk: Ninth Edition Unix introduced the EX and EE extensions. Documenter's Workbench (DWB), Heirloom Doctools, and Plan 9 troffs, and mandoc (since 1.12.2) support them. Solaris troff does not ๐
.RSโ[inset-amount]โ Start new relative inset. man saves any current inset amount and moves right by:inset-amount, if specified; the indentation amount of the precedingIP,TP, orHPmacro call if no (sub-)sectioning or ordinary paragraphing macro has intervened; or the amount of theINregister.RScalls can nest; each one increments by 1 the level used byRE. The level prior to anyRScall is 1 ๐ฆ.REโ[inset-level]โ End a relative inset, reducing it to that ofinset-level(or by 1 if not specified) and restoring the corresponding inset amount ๐
๐ง Paragraphing macros ๐ง
These macros break the output line. An ordinary paragraph (P) indents all output lines by the same amount. A hanging paragraph (HP) is a cosmetic variant of P with a hanging indent. Definition lists show up in man pages constantly; these can be set as tagged paragraphs, which have one (TP) or more (TQ) leading tags followed by a paragraph with an additional indentation. The indented paragraph (IP) macro can continue the indented content of a narrative started with TP, or present an itemized or ordered list. If a paragraphing macro has been called since SH or SS, all of them except TQ follow the break with vertical space (in an amount configured by the deprecated PD macro); see subsection "Horizontal and vertical spacing" below. Except for TQ, these macros reset the type size, hyphenation, and adjustment to (configured) defaults, and the font style to roman ๐
.P,.LP,.PPโ Begin a new paragraph; these macros are synonymous. Any indentation from use ofIP,TP, orHPis cleared. The inset amount, as affected byRSandRE, is not ๐.HPโ[indentation]โ Set a paragraph with a hanging indentation. Text on output lines after the first is indented byindentation, if specified, and by the amount of theINregister otherwise.
โ ๏ธ Caution, bestie, read this one: a hanging indentation cannot be expressed naturally in (pure) HTML, a hanging paragraph is not distinguishable from an ordinary one if it formats on only one output line, and non-roff-based man page interpreters may treat HP as an ordinary paragraph anyway. So information or distinctions you mean to express with indentation may be lost ๐ญ
and weโre back in the paragraphing macros, bestie โ these are the tag-and-indent girlies, and they are lowkey the backbone of every man page ๐
.TP [indentation]โ Sets an indented paragraph with a leading unindented tag. The macro plants a one-line input trap that honors the\cescape sequence; text on the next line becomes the tag, set without indentation. Text on subsequent lines is indented by indentation, if specified, and by the amount of theINregister otherwise. If the tag, plus the โtag spacingโ stored in theTSregister (see section โOptionsโ below) is wider than the indentation, the package breaks the line after the tag. ๐.TQโ Sets an additional tag for a paragraph tagged withTP, planting a one-line input trap as withTP.
TQ is a GNU extension supported by Heirloom Doctools troff (since Git snapshot 151218) and mandoc (since 1.14.5) but not by DWB, Plan 9, or Solaris troffs. iykyk โจ
.IP [mark [indentation]]โ Sets an indented paragraph with an optional mark. Arguments, if present, are handled as withTP, except that the mark argument toIPcannot include a macro call, and the tag separation amount stored in theTSregister is not enforced. not me thinking thatโs a very specific little caveat ๐
โจ Synopsis macros โจ
Use SY and YS to summarize syntax using familiar Unix conventions. Heirloom Doctools troff (since Git snapshot 151218) and mandoc (since 1.14.5) support these GNU extensions; DWB, Plan 9, and Solaris troffs do not. ๐ฆ
.SY keyword [suffix]โ Begins synopsis. Adjustment and automatic hyphenation are disabled. IfSYhas already been called without a correspondingYS, a break is performed. keyword and any suffix are set in bold. When suffix is present, the package sets the next word after it without intervening space. If a break is required in subsequent text (up to a paragraphing, sectioning, orYSmacro call), lines after the first are indented. Unless the previous synopsisโs indentation is reused (seeYSbelow), output lines after the first indent by the width of the pending output line up to the end of keyword plus a space, if keyword is the only argument, and up to the end of suffix otherwise. the way this indentation math is doing the most ๐ญ.YS [reuse-indentation]โ Ends synopsis, breaking the line and restoring indentation, adjustment, and hyphenation to their previous states. If an argument is given, the indentation corresponding to the previousSYcall is reused by the nextSYcall instead of being computed. slay, cleanup queen ๐ง
๐ Hyperlink macros ๐
Man page cross references are best presented with MR. Mark email addresses with MT/ME and other sorts of URI with UR/UE. To hyperlink text, terminals and pager programs must support ECMA-48 OSC 8 escape sequences (see grotty(1)). When device support is unavailable or disabled with the U register (see section โOptionsโ below), groff man renders these URIs between angle brackets (โจ โฉ) after the linked text. fancy link behavior, but make it terminal-friendly ๐ฅ
MT, ME, UR, and UE are GNU extensions supported by Heirloom Doctools troff (since Git snapshot 151218) and mandoc (UR/UE since 1.12.3; MT/ME since 1.14.2) but not by DWB, Plan 9 (original), or Solaris troffs. Plan 9 from User Spaceโs troff implements MR. the compatibility lore is deep, bestie ๐
Prepare arguments to MR, MT, and UR for typesetting; they can appear in the output. Use special character escape sequences to encode Unicode basic Latin characters where necessary, particularly the hyphen-minus. especially the hyphen-minus, do not @ me โญ
.MR topic [manual-section [trailing-text]]โ (since groff1.23) Sets a man page cross reference as โtopic(manual-section)โ. If manual-section is absent, the package omits the surrounding parentheses. If trailing-text (typically punctuation) is specified, it follows the closing parenthesis without intervening space. Hyphenation is disabled while the cross reference is set. topic is set in the font specified by theMFstring. If manual-section is present, the cross reference hyperlinks to a URI of the form โman:topic(manual-section)โ. cross-reference icon behavior ๐.MT address/.ME [trailing-text]โ Identify address as an RFC 6068 addr-spec for a โmailto:โ URI with the text between the two macro calls as the link text. An argument toMEis placed after the link text without intervening space. address may not be visible in the rendered document if hyperlinks are enabled and supported by the output driver. If they are not, address is set in angle brackets after the link text and before trailing-text. If hyperlinking is enabled but there is no link text, address is formatted and hyperlinked without angle brackets, except when address appears as aTPparagraph tag. email-link queen behavior ๐.UR uri/.UE [trailing-text]โ Identify uri as an RFC 3986 URI hyperlink with the text between the two macro calls as the link text. An argument toUEis placed after the link text without intervening space. uri may not be visible in the rendered document if hyperlinks are enabled and supported by the output driver. If they are not, uri is set in angle brackets after the link text and before trailing-text. If hyperlinking is enabled but there is no link text, uri is formatted and hyperlinked without angle brackets, except when uri appears as aTPparagraph tag. URI hyperlink main character energy ๐
If a UR/UE or MT/ME pair occurs in a TP tag and hyperlinking is unavailable, groff man sets the link target at the beginning of the indented paragraph, not as part of the tag, unless there is no link text. thatโs the edge case, bestie โ write it down ๐ซถ
๐ Font style macros ๐
The man macro package is limited in its font styling options, offering only bold (B), italic (I), and roman. Italic text may instead render underscored on terminals. SM sets text at a smaller type size, which differs visually from regular-sized text only on typesetters. The macros BI, BR, IB, IR, RB, and RI set their odd- and even-numbered arguments as text in the alternating styles their names indicate, with no space separating them. font alternation girlies, assemble ๐
The default type size and family for typesetters is 10-point Times, except on the X75-12 and X100-12 devices where the type size is 12 points. The default style is roman. noted, typography bestie โจ
.B [text]โ Sets text in bold. Given no argument,Bplants a one-line input trap; text on the next line, which can be further formatted with a macro, is set in bold. bold and unbothered ๐ฆ.I [text]โ Sets text in an italic or oblique face. Given no argument,Iplants a one-line input trap; text on the next line, which can be further formatted with a macro, is set in an italic or oblique face. italic excellence ๐ธ.SM [text]โ Sets text one point smaller than the default type size on typesetters. Given no argument,SMplants a one-line input trap; text on the next line, which can be further formatted with a macro, is set smaller. smol but valid ๐
Unlike the above font style macros, the font style alternation macros below set no input traps; they must be given arguments to have effect. They apply italic corrections as appropriate. no arguments, no effect โ she said what she said ๐
.BI bold-text italic-text ...โ Sets each argument in bold and italics, alternately..BR bold-text roman-text ...โ Sets each argument in bold and roman, alternately..IB italic-text bold-text ...โ Sets each argument in italics and bold, alternately..IR italic-text roman-text ...โ Sets each argument in italics and roman, alternately..RB roman-text bold-text ...โ Sets each argument in roman and bold, alternately..RI roman-text italic-text ...โ Sets each argument in roman and italics, alternately.
๐ง Horizontal and vertical spacing ๐ง
The package sets all text inboard of the left edge of the output medium by the amount of the page offset; see register PO in section โOptionsโ below. Headers, footers (both set with TH), and section headings (SH) lie at the page offset. groff man indents subsection headings (SS) by the amount in the SN register. spacing lore, but make it cute ๐
Ordinary paragraphs not within an RS/RE inset region are inset by the amount stored in the BP register; see section โOptionsโ below. The IN register configures the default indentation amount used by RS (as the inset-amount), IP, TP, and HP; an overriding argument is a number plus an optional scaling unit. If no scaling unit is given, the man package assumes โnโ. An indentation specified in a call to IP, TP, or HP persists until (1) another of these macros is called with an indentation argument, or (2) SH, SS, or P or its synonyms is called; these clear the indentation entirely. the persistence rules are giving โshe remembers until she doesnโtโ ๐
Several macros insert vertical space: SH, SS, TP, P (and its synonyms), IP, and HP. They then enable no-space mode; see groff(7). The default inter-section and inter-paragraph spacing is 1v for terminals and 0.4v for typesetters. (The deprecated macro PD can change this vertical spacing, but we discourage its use.) Between EX and EE calls, the inter-paragraph spacing is 1v regardless of output device. deprecated PD? we donโt know her like that ๐
โญ Registers โญ
Registers are described in section โOptionsโ below. They can be set not only on the command line but in the site man.local file as well; see section โFilesโ below. site config besties, this oneโs for you ๐ซถ
๐ธ Strings ๐ธ
The following strings are defined for use in man pages. None of these is necessary in a contemporary man page; see groff_man_style(7). groff man supports others for configuration of rendering parameters; see section โOptionsโ below. vintage string behavior, but noted โจ
\*Rโ interpolates a special character escape sequence for the โregistered signโ glyph,\(rg, if available, and โ(Reg.)โ otherwise. registered-sign icon behavior ๐\*Sโ interpolates an escape sequence setting the type size to the document default. size reset slay ๐\*(lqand\*(rqโ interpolate special character escape sequences for left and right double-quotation marks,\(lqand\(rq, respectively. quote marks, but make them special-character official ๐\*(Tmโ interpolates a special character escape sequence for the โtrade mark signโ glyph,\(tm, if available, and โ(TM)โ otherwise. trademark glamour โญ
๐ฆ Hooks ๐ฆ
Two macros, both GNU extensions, are called internally by the groff man package to format page headers and footers and can be redefined by the administrator in a siteโs man.local file (see section โFilesโ below). The presentation of TH above describes the default headers and footers. Because these macros are hooks for groff man internals, man pages have no reason to call them. Such hook definitions typically consist of โspโ and โtlโ requests. PT furthermore has the responsibility of emitting a PDF bookmark after writing the first page header in a document. Consult the existing implementations in an.tmac when drafting replacements. admin-only hook girlies, not for random man pages ๐ฅ
.BTโ Sets the page footer text (โbottom trapโ). bottom trap icon ๐.PTโ Sets the page header text (โpage trapโ). page trap icon ๐
okay so, to remove a page header or footer entirely, define the appropriate macro as empty rather than deleting it. That's the whole move. ๐
๐ Deprecated features ๐
For man pages that are for public distribution, using any of the following is discouraged. Like, please don't โ they're giving legacy energy in the bad way. ๐
.AT [system [release]]โ Alters the footer for use with legacy AT&T man pages, overriding any definition of the footer-inside argument toTH. This macro exists only to render man pages from historical systems. The inside footer gets populated according to the value of system:3โ 7th edition (default)4โ System III5โ System V
The optional release argument specifies the release number, as in โSystem V Release 3โ.
.DTโ Resets tab stops to the default (every0.5i). Use of this presentation-oriented macro is deprecated. It translates poorly to HTML, under which exact space control and tabulation are not readily available. So any information or distinctions you're using tab stops to express are likely to get lost. If you feel tempted to change the tab stops just so you can call this macro later to restore them, consider composing a table usingtbl(1)instead. slay for tables ๐.OP option-name [option-argument]โ Indicates an optional command parameter called option-name, which is set in bold. If the option takes an argument, specify option-argument using a noun, abbreviation, or hyphenated noun phrase. If present, option-argument is preceded by a space and set in italics. Square brackets in roman surround both arguments.
Use of this quasi-semantic macro, an extension whose name originated in DWB troff, is deprecated; groff's interface differs. Neither can easily be used to annotate options that take optional arguments or options whose arguments have internal structure (such as a mixture of literal and variable components). One could work around these limitations with font selection escape sequences, but font style alternation macros are preferable; they are more flexible and perform italic corrections on typesetters. iykyk โจ
.PD [vertical-space]โ Configures the amount of vertical space between paragraphs or (sub)sections. The optional argument vertical-space specifies the amount; the default scaling unit is โvโ. Without an argument, inter-paragraph spacing resets to its default value; see subsection โHorizontal and vertical spacingโ above.
Use of this presentation-oriented macro is deprecated. It translates poorly to HTML, under which exact control of inter-paragraph spacing is not readily available. Thus, information or distinctions that you use PD to express are likely to be lost. rip to that spacing control ๐
.SB [text]โ Sets text in bold and (on typesetters) one point smaller than the default type size. Given no argument,SBplants a one-line input trap; text on the next line, which can be further formatted with a macro, is set smaller and in bold. Use of this macro, an extension originating in SunOS 4.0 troff, is deprecated.SMwithout an argument, followed immediately by โB textโ, produces the same output more portably. The macros' order is interchangeable; put text with the latter. portable era ๐ซถ.UC [version]โ Alters the footer for use with legacy BSD man pages, overriding any definition of the footer-inside argument toTH. This macro exists only to render man pages from historical systems. The inside footer gets populated according to the value of version:3โ 3rd Berkeley Distribution (default)4โ 4th Berkeley Distribution5โ 4.2 Berkeley Distribution6โ 4.3 Berkeley Distribution7โ 4.4 Berkeley Distribution
๐ History ๐
M. Douglas McIlroy designed, implemented, and documented the AT&T man macros for Unix Version 7 (1979) and employed them to edit Volume 1 of its Programmer's Manual, a compilation of all man pages supplied by the system. The package supported the macros listed in this page not described as extensions, except P and the deprecated AT and UC. It documented no registers and defined only R and S strings. history bestie ๐ฆ
UC appeared in 3BSD (1980). Unix System III (1980) introduced P and exposed the registers IN and LL, which had been internal to Seventh Edition Unix man. PWB/Unix 2.0 (1980) added the Tm string. 4BSD (1980) added lq and rq strings. SunOS 2.0 (1985) recognized C, D, P, and X registers. 4.3BSD (1986) added AT and P. Ninth Edition Unix (1986) introduced EX and EE. SunOS 4.0 (1988) added SB. Unix System V (1988) incorporated the lq and rq strings. the timeline ate โญ
Except for EX/EE, James Clark implemented the foregoing features in early versions of groff. Later, groff 1.20 (2009) resurrected EX/EE and originated SY/YS, TQ, MT/ME, and UR/UE. Plan 9 from User Space's troff introduced MR in 2020, and incorporated the lq and rq strings in 2025. timeline slay ๐
๐ OPTIONS ๐
The following groff options set registers (with -r) and strings (with -d) recognized and used by the man macro package. To ensure rendering consistent with output device capabilities and reader preferences, man pages should never manipulate them. Like, hands off. ๐
โโ๏ธ
-dAD=adjustment-modeโ Sets line adjustment to adjustment-mode, which is typically โbโ for adjustment to both margins (the default), or โlโ for left alignment (ragged right margin). Any valid argument to groff's โadโ request may be used. Seegroff(7)for less-common choices. adjustment era โจ-rBP=base-paragraph-insetโ Sets the inset amount for ordinary paragraphs not within anRS/REinset. The default is5n. ๐-rcR=1โ Enables continuous rendering. Output is not paginated; instead, one (potentially very long) page is produced. This is the default for terminal and HTML devices. Use-rcR=0to disable it on terminals; on HTML devices, it cannot be disabled. one long page energy ๐ญ-rC1โ Numbers output pages consecutively, in strictly increasing sequence, rather than resetting the page number to1(or the value of registerP) with each new man document. ๐ฅ-rCHECKSTYLE=nโ Reports problems with usage of this macro package exhibited by the input at verbosity level n, where n is an integer in the range0โ3, inclusive;0disables the messages and is the default. This feature is a development and debugging aid for man page maintainers; the problems diagnosed, and range and meanings of the supported levels, are subject to change. debug bestie ๐-rCS=1โ Sets section headings (the argument(s) toSH) in full capitals. This transformation is off by default because it discards lettercase distinctions. ALL CAPS MOMENT ๐-rCT=1โ Sets the man page identifier (the first argument toTH) in full capitals in headers and footers. This transformation is off by default because it discards lettercase distinctions. caps but make it header/footer ๐-rD1โ Enables double-sided layout, formatting footers for even and odd pages differently; see the description ofTHin subsection โDocument structure macrosโ above. ๐ฆ-rFT=footer-distanceโ Sets distance of the footer relative to the bottom of the page to footer-distance; this amount is always negative. At one half-inch above this location, the page text is broken before writing the footer. Ignored if continuous rendering is enabled. The default is โ-0.5i - 1vโ. negative footer distance, iconic ๐-dHF=heading-fontโ Selects the font used for section and subsection headings; the default is โBโ (bold style of the default family). Any valid argument to groff's โftโ request may be used. Seegroff(7). โญ-rHY=0โ Disables automatic hyphenation. Normally, it is enabled (1). The hyphenation mode is determined by the groff locale; see section โLocalizationโ ofgroff(7). no surprise hyphens โจ-rIN=standard-indentationโ Sets the default indentation amount used byIP,TP, andHP, and the inset amount used byRS. The default is7non terminals and7.2non typesetters. Use only integer multiples of unit โnโ on terminals for consistent indentation. ๐ธ-rLL=line-lengthโ Sets line length; the default is80non terminals and6.5ion typesetters. line length era ๐ซถ-rLT=title-lengthโ Sets the line length for titles. By default, it is set to the line length (see-rLLabove). ๐-dMF=man-page-topic-fontโ Selects the font used for man page identifiers inTHcalls and topics named inMRcalls; the default is โIโ (italic style of the default family). Any valid argument to groff's โftโ request may be used. If theMFstring ends in โIโ, the package assumes it to be an oblique typeface, and applies italic corrections before and after man page topics and identifiers. italic corrections, we love ๐-rPnโ Starts enumeration of pages at n. The default is1. ๐ฅ-rPO=page-offsetโ Sets page offset; the default is0on terminals and1ion typesetters. ๐-rStype-sizeโ Uses type-size for the document's body text; acceptable values are10,11, or12points. See subsection โFont style macrosโ above for the default. body text glow-up โจ-rSN=subsection-indentationโ Sets indentation of subsection headings to subsection-indentation. The default is3n. ๐ฆ-rTS=separationโ Requires the given separation between aTPparagraph's tag and its body. The default is2n. ๐-rU0โ Disables generation of URI hyperlinks in output drivers capable of them, making the arguments toMTandURcalls visible as formatted text.grohtml(1),gropdf(1), andgrotty(1)enable hyperlinks by default (the last only if not in its legacy output mode). hyperlink vibe check ๐ซถ-rXpโ Numbers successors of page p as pa, pb, pc, and so forth. The register tracking the suffixed page letter uses format โaโ (see the โafโ request ingroff(7)). suffix era ๐
๐ Files ๐
/usr/share/groff/1.24.2/tmac/an.tmacโ the main character of this whole situation: most man macros are defined right here. It also loads extensions froman-ext.tmac(peep the next entry, bestie)./usr/share/groff/1.24.2/tmac/andoc.tmacโ this briefgroffprogram detects whether a document is using themanormdocmacro package and loads the correct macro definitions. It can do that because pages using them have to callTHorDd, respectively, before any other macros. So amanprogramโor you, typing, for example,groff -mandoc page.1โdoesn't need to know which package the filepage.1uses. Multiple man pages, in either format, can be handled;andocreloads each macro package as necessary. Page-local redefinitions of names used by themanormdocpackages prior toTHorDdcalls are โclobberedโ by the reloading process. If you want to provide your own definition of an extension macro to ensure its availability, thean-ext.tmacentry below offers advice. iykyk ๐/usr/share/groff/1.24.2/tmac/an-ext.tmacโ definitions of macros described above as extensions (and not deprecated) live in this file. In some cases they're simpler versions of definitions that appear inan.tmac, and they're ignored if the formatter is GNUtroff. They're written to be compatible with AT&Ttroffand permissively licensedโnot copylefted. To reduce the risk of name space collisions, string and register names begin only with โmโ. We encourage man page authors who are concerned about portability to legacy Unix systems to copy these definitions into their pages, and maintainers oftroffimplementations or work-alike systems that format man pages to re-use them. To ensure reliable rendering, define them after your page callsTH; see the discussion ofandoc.tmacabove. Further, it's wise to define such page-local macros (if at all) after the โNameโ section to accommodate timidmakewhatis(8)ormandb(8)implementations that easily give up scanning for indexing material. ๐ซถ/usr/share/groff/1.24.2/tmac/man.tmacโ a wrapper enabling the package to be loaded with the option โ-m manโ./usr/share/groff/1.24.2/tmac/mandoc.tmacโ a wrapper enablingandoc.tmacto be loaded with the option โ-m mandocโ./usr/share/groff/site-tmac/man.localโ put site-local changes and customizations into this file. your own little corner of the groff universe โจ
๐ Authors ๐
James Clark wrote the initial GNU implementation of the man macro package. Later, Werner Lemberg supplied the S, LT, and cR registersโthe last one a 4.3BSD-Reno mdoc(7) feature. Larry Kollar added the FT, HY, and SN registers; the HF string; and the PT and BT macros in groff 1.19 (2003). Lemberg and Eric S. Raymond contributed EX/EE, MT/ME, UR/UE, TQ, and an early version of the SY/YS macros to groff 1.20 (2009). G. Branden Robinson implemented the AD and MF strings; CS, CT, and U registers; and the MR macro for groff 1.23 (2023), and the BP, PO, and TS registers and a revised implementation of the SY/YS macros for groff 1.24 (2026). absolute legends, every one of them ๐
Susan G. Kleinmann wrote the initial version of this document for the Debian GNU/Linux system. Lemberg imported it to groff. He and Robinson revised and updated it. Raymond and Robinson documented the extension macros. documentation queens and kings fr fr ๐
๐ See also ๐
tbl(1), eqn(1), and refer(1) are preprocessors used with man pages. man(1) describes the man page librarian on your system. groff_mdoc(7) details the groff version of BSD's alternative macro package for man pages.
groff_man_style(7), groff(7), groff_char(7) โ more reading if you're obsessed like me ๐ฆ
That's the whole page, bestie! This iconic little number is groff_man(7) from groff 1.24.2, dated 2026-10-01. periodt ๐โจ๐
๐ฆ where this page comes from
- alpine 3.24: groff-doc 1.24.2-r0 ยท GPL-3.0-or-later
- Copyright 1999-2017 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