Throughout the UNIX manual pages, a manual entry is simply referred to as a man page, regardless of actual length and without sexist intention.
In general, GNU troff(1) macros accept an unlimited number of arguments (contrary to other versions of troff which can't handle more than nine arguments). In limited cases, arguments may be continued or extended on the next line (See Sx Extended Arguments below). Almost all macros handle quoted arguments (see Sx Passing Space Characters in an Argument below).
Most of the -mdoc general text domain and manual domain macros are special in that their argument lists are parsed for callable macro names. This means an argument on the argument list which matches a general text or manual domain macro name (and which is defined to be callable) will be executed or called when it is processed. In this case the argument, although the name of a macro, is not preceded by a `.' (dot). This makes it possible to nest macros; for example the option macro, `.[,] ' may call the flag and argument macros, `- ' and `file ... ' to specify an optional flag with an argument:
To prevent a string from being interpreted as a macro name, precede the string with the escape sequence `\&' :
Here the strings `- ' and `file ... ' are not interpreted as macros. Macros whose argument lists are parsed for callable arguments are referred to as parsed and macros which may be called from an argument list are referred to as callable throughout this document. This is a technical faux pas as almost all of the macros in -mdoc are parsed, but as it was cumbersome to constantly refer to macros as being callable and being able to call other macros, the term parsed has been used.
In the following, we call an -mdoc macro which starts a line (with a leading dot) a command if this distinction is necessary.
There are two possible ways to pass an argument which contains
an embedded space.
One way of passing a string containing blank spaces is to use the hard or
unpaddable space character
`\
,'
that is, a blank space preceded by the escape character
`\'
This method may be used with any macro but has the side effect of
interfering with the adjustment of text over the length of a line.
Troff
sees the hard space as if it were any other printable character and cannot
split the string into blank or newline separated pieces as one would expect.
This method is useful for strings which are not expected to overlap a line
boundary.
An alternative is to use
`\~'
,
a paddable (i.e. stretchable), unbreakable space (this is a
GNU
troff(1)
extension).
The second method is to enclose the string with double quotes.
For example:
If the `\' before the space in the first example or double quotes in the second example were omitted, `.Fn would ' see three arguments, and the result would be:
Fn fetch char *str
Leading spaces will cause a break and are output directly. Avoid this behaviour if possible. Similarly, do not use more than one space character between words in an ordinary text line; contrary to other text formatters, they are not replaced with a single space.
You can't pass `q]' directly as an argument. Use `\*[q]' (or `\*q' ) instead.
By default, troff(1) inserts two space characters after a punctuation mark closing a sentence; characters like `)' or `'' are treated transparently, not influencing the sentence-ending behaviour. To change this, insert `\&' before or after the dot:
The .Ql . character. .Pp The .Ql \&. character. .Pp .No test . test .Pp .No test. test
gives
The `.' characterThe `.' character.
test test
test. test
As can be seen in the first and third line, -mdoc handles punctuation characters specially in macro arguments. This will be explained in section Sx General Syntax below. In the same way, you have to protect trailing full stops of abbreviations with a trailing zero-width space: `e.g.\&'
A comment in the source file of a man page can be either started with `.\' on a single line, `\' after some input, or `\#' anywhere (the latter is a GNU troff(1) extension); the rest of such a line is ignored.
.\" The following commands are required for all man pages. .Dd Month day, year .Os [OPERATING_SYSTEM] [version/release] .Dt DOCUMENT_TITLE [section number] [architecture/volume] .Sh NAME .Nm name .Nd one line description of name .\" This next command is for sections 2 and 3 only. .\" .Sh LIBRARY .Sh SYNOPSIS .Sh DESCRIPTION .\" The following commands should be uncommented and .\" used where appropriate. .\" .Sh IMPLEMENTATION NOTES .\" This next command is for sections 2, 3 and 9 function .\" return values only. .\" .Sh RETURN VALUES .\" This next command is for sections 1, 6, 7 and 8 only. .\" .Sh ENVIRONMENT .\" .Sh FILES .\" .Sh EXAMPLES .\" This next command is for sections 1, 6, 7, 8 and 9 only .\" (command return values (to shell) and .\" fprintf/stderr type diagnostics). .\" .Sh DIAGNOSTICS .\" .Sh COMPATIBILITY .\" This next command is for sections 2, 3 and 9 error .\" and signal handling only. .\" .Sh ERRORS .\" .Sh SEE ALSO .\" .Sh STANDARDS .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS
The first items in the template are the commands `., ' `., ' and `. ' the document date, the operating system the man page or subject source is developed or modified for, and the man page title (in upper case along with the section of the manual the page belongs in. These commands identify the page and are discussed below in Sx TITLE MACROS .
The remaining items in the template are section headers ( .
Example:
Note that a macro takes effect up to the next nested macro. For example, `.foo ' Aq bar doesn't produce `foo <bar> ' but `foo Aq bar ' Consequently, a warning message is emitted for most commands if the first argument is a macro itself since it cancels the effect of the calling command completely. Another consequence is that quoting macros never insert literal quotes; `foo <bar> ' has been produced by `.q]foo ' <bar>q] .
Most macros have a default width value which can be used to specify a label width ( -width or offset ( -offset for the `.
' and `. ' macros. It is recommended not to use this rather obscure feature to avoid dependencies on local modifications of the -mdoc package.
Under operating-system] the following sections are defined:
A volume name may be arbitrary or one of the following:
For compatibility, `MMI' can be used for `IND' , and `LOC' for `LOCAL' Values from the previous table will specify a new volume name. If the third parameter is a keyword designating a computer architecture, its value is prepended to the default volume name as specified by the second parameter. By default, the following architecture keywords are defined: # we use `No' to avoid hyphenation
alpha , amiga , arc , arm26 , arm32 , atari , bebox , cobalt , evbsh3 hp300 , hpcmips , i386 , luna68k , m68k , mac68k , macppc , mips mmeye , mvme68k , news68k , newsmips , next68k , ofppc , pc532 , pmax powerpc , prep , sgimips , sh3 , sparc , sparc64 , sun3 , tahoe , vax x68k
In the following examples, the left (which is identical to the right) and the middle part of the manual page header strings are shown.
Local, OS-specific additions might be found in the file mdoc.local look for strings named `volume-ds-XXX' (for the former type) and `volume-as-XXX' (for the latter type); `XXX' then denotes the keyword to be used with the `. ' macro.
This macro is neither callable nor parsed.
For ATT an unknown second parameter will be replaced with the string UNIX for the other predefined acronyms it will be ignored and a warning message emitted. Unrecognized arguments are displayed as given in the page footer. For instance, a typical footer might be:
.BSD 4.3
giving `4.3~Berkeley' Distribution , or for a locally produced set
.CS Department
which will produce `CS~Department'
If the `.macro ' is not present, the bottom left corner of the manual page will be ugly.
This macro is neither callable nor parsed.
.January 25, 2001
Otherwise, the current date is used, ignoring the parameters.
This macro is neither callable nor parsed.
In the first case, troff(1) macros are themselves a type of command; the general syntax for a troff command is:
.Xx argument1 argument2 ...
`.Xx is ' a macro command, and anything following it are arguments to be processed. In the second case, the description of a UNIX command using the content macros is a bit more involved; a typical Sx SYNOPSIS command line might be displayed as:
filter [-flag ] Ao Ar infile Ac Ao Ar outfile Ac
Here, filter is the command name and the bracketed string -flag is a flag argument designated as optional by the option brackets. In -mdoc terms, Ao Ar infile Ac and Ao Ar outfile Ac are called meta arguments in this example, the user has to replace the meta expressions given in angle brackets with real file names. Note that in this document meta arguments are used to describe -mdoc commands; in most man pages, meta variables are not specifically written with angle brackets. The macros which formatted the above example:
.Nm filter .Op Fl flag .Ao Ar infile Ac Ao Ar outfile Ac
In the third case, discussion of commands and command syntax includes both examples above, but may add more detail. The arguments Ao Ar infile Ac and Ao Ar outfile Ac from the example above might be referred to as operands or file arguments Some command line argument lists are quite long:
Here one might talk about the command make and qualify the argument, makefile as an argument to the flag, -f or discuss the optional file operand target In the verbal context, such detail can prevent confusion, however the -mdoc package does not have a macro for an argument to a flag. Instead the `file ... ' argument macro is used for an operand or file argument like target as well as an argument to a flag like variable The make command line was produced from:
.Nm make .Op Fl eiknqrstv .Op Fl D Ar variable .Op Fl d Ar flags .Op Fl f Ar makefile .Op Fl I Ar directory .Op Fl j Ar max_jobs .Op Ar variable Ns = Ns Ar value .Bk .Op Ar target ... .Ek
The `.and ' `.macros ' are explained in Sx Keeps .
.sptr, ptr),
The result is:
sptr, ptr),
The punctuation is not recognized and all is output in the font used by `.file ... ' If the punctuation is separated by a leading white space:
.sptr , ptr ) ,
The result is:
sptr , ptr
The punctuation is now recognized and output in the default font distinguishing it from the argument strings. To remove the special meaning from a punctuation character escape it with `\&'
Troff is limited as a macro language, and has difficulty when presented with a string containing a member of the mathematical, logical or quotation set:
{+,-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
The problem is that troff may assume it is supposed to actually perform the operation or evaluation suggested by the characters. To prevent the accidental evaluation of these characters, escape them with `\&' Typical syntax is shown in the first content macro displayed below, `. '
Usage: .Ao address Ac ...
Usage: .An Ao author name Ac ...
The default width is 12n.
In the Sx AUTHORS section, the `.An command ' causes a line break allowing each new name to appear on its own line. If this is not desirable,
.An -nosplit
call will turn this off. To turn splitting back on, write
.An -split
Usage: .[Ao argument Ac ...]
Usage: .Ao argument Ac ...
In the Sx SYNOPSIS section a `.command ' causes a line break before and after its arguments are printed.
Usage: .Ao defined variable Ac ...
Usage: .Er Ao errno type Ac ...
Usage: .Ao argument Ac ...
Usage: .-Ao argument Ac ...
The `.- ' macro without any arguments results in a dash representing stdin/stdout. Note that giving `.- ' a single dash will result in two dashes.
Usage: .Fd Ao argument Ac ...
In the Sx SYNOPSIS section a `.Fd command ' causes a line break if a function has already been presented and a break has not occurred. This leaves a nice vertical space in between the previous function call and the declaration for the next function.
The `.In ( ' #include statement) macro is the short form of the above example. It specifies the C~header file as being included in a C~program. It also causes a line break, and is neither callable nor parsed.
Usage: .In Ao header file Ac
Usage: .Ft Ao type Ac ...
Usage: .Fn Ao function Ac [Ao parameter Ac ...]
Note that any call to another macro signals the end of the `.Fn call ' (it will insert a closing parenthesis at that point).
For functions with many parameters (which is rare), the macros `.Fo (function ' open) and `.Fc (function ' close) may be used with `.Fa (function ' argument).
Example:
.Ft int .Fo res_mkquery .Fa "int op" .Fa "char *dname" .Fa "int class" .Fa "int type" .Fa "char *data" .Fa "int datalen" .Fa "struct rrec *newrr" .Fa "char *buf" .Fa "int buflen" .Fc
Produces:
Ft int Fo res_mkquery Fa int op Fa char *dname Fa int class Fa int type Fa char *data Fa int datalen Fa struct rrec *newrr Fa char *buf Fa int buflen Fc
In the Sx SYNOPSIS section, the function will always begin at the beginning of line. If there is more than one function presented in the Sx SYNOPSIS section and a function type has not been given, a line break will occur, leaving a nice vertical space between the current function name and the one prior.
The default width values of `.Fn and ' `.Fo are ' 12n and 16n, respectively.
Usage: .Fa Ao function argument Ac ...
Usage: .Rv [-std [Ao function Ac ... ] ]
For example, `.Rv -std ' atexit produces: # a small hack to suppress a warning message Rv -std atexit
The -std option is valid only for manual page sections~2 and~3. Currently, this macro does nothing if used without the -std flag.
Usage: .Ex [-std [Ao utility Ac ... ] ]
For example, `.Ex -std ' cat produces: # a small hack to suppress a warning message Ex -std cat
The -std option is valid only for manual page sections 1, 6 and~8. Currently, this macro does nothing if used without the -std flag.
Usage: .Ao argument Ac ...
Usage: .Lb Ao argument Ac ...
Available arguments to `.Lb and ' their results are:
Local, OS-specific additions might be found in the file mdoc.local look for strings named `str-Lb-XXX' `XXX' then denotes the keyword to be used with the `.Lb macro. '
Usage: .Ao argument Ac ...
Usage: .[Ao argument Ac ...]
Usage: .[[Ao option Ac ...] ]
Here a typical example of the `.[and ' `.] ' macros:
.Oo .Op Fl k Ar kilobytes .Op Fl i Ar interval .Op Fl c Ar count .Oc
Produces:
[[-k kilobytes ] [-i interval ] [-c count ] ]
The default width values of `.[and] ' `.[are ' 14n and 10n, respectively.
Usage: .[Ao pathname Ac ...]
Usage: .St Ao abbreviation Ac ...
Available pairs for ``Abbreviation/Formal Name'' are:
ANSI/ISO C
POSIX Part 1: System API
POSIX Part 2: Shell and Utilities
X/Open
Miscellaneous
Usage: .Vt Ao type Ac ...
Usage: .Ao variable Ac ...
Usage: .AomanpagenameAcOoAosectionAcOc...
Usage: .AT&T System [Ao version Ac ...]
The following values for Ao version Ac are possible:
32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4
"Usage: .Bx" Bro -alpha | -beta | -devel Brc ...
" .Bx" [Ao version Ac [Ao release Ac ...] ]
Ao version Ac will be prepended to the string `BSD ' The following values for Ao release Ac are possible:
Reno, reno, Tahoe, tahoe, Lite, lite, Lite2, lite2
Usage: .Nx [Ao version Ac ...]
For possible values of Ao version Ac see the description of the `.command ' above in section Sx TITLE MACROS .
Usage: .Fx [Ao version Ac ...]
For possible values of Ao version Ac see the description of the `.command ' above in section Sx TITLE MACROS .
Usage: .Ox [Ao version Ac ...]
Usage: .Bsx [Ao version Ac ...]
Usage: .UNIX
Usage: .Ao argument Ac ...
`.Bf has ' the following syntax:
.Bf Ao font mode AcAo font mode Ac must be one of the following three types:
Both macros are neither callable nor parsed.
# XXX
Quote Ta Open Ta Close Ta Function Ta Result .Aq Ta .Ao Ta .Ac Ta Angle Bracket Enclosure Ta Ao string Ac .Bq Ta .Bo Ta .Bc Ta Bracket Enclosure Ta Bo string Bc .Brq Ta .Bro Ta .Brc Ta Brace Enclosure Ta Bro string Brc .``Ta .Do Ta .Dc Ta Double Quote Ta Do string Dc .Eq Ta .Eo Ta .Ec Ta Enclose String (in XX) Ta XXstringXX '' .(Ta .Po Ta .Pc Ta Parenthesis Enclosure Ta Po string Pc .`Ta Ta Ta Quoted ' ) Literal Ta So string Sc or Li string .Qq Ta .Qo Ta .Qc Ta Straight Double Quote Ta Qo string Qc .`Ta .So Ta .Sc Ta Single Quote Ta So string Sc
'
All macros ending with `q' and `o' have a default width value of 12n.
The default width is 16n.
The default width is 12n.
The `.macro ' (see below) performs the analogous suffix function.
Examples of quoting:
For a good example of nested enclosure macros, see the `.[option] ' macro. It was created from the same underlying enclosure macros as those presented in the list above. The `. ' and `. ' extended argument list macros are discussed below.
Usage: .Ao argument Ac ...
"Usage:" ... Ao argument Ac [Ao argument Ac ...]
" " .Ao argument Ac ...
Note: The `.macro ' always invokes the `.macro ' after eliminating the space unless another macro name follows it. If used as a command (i.e., the second form above in the `Usage' line), `.is ' identical to `. '
Usage: .Sx Ao section reference Ac ...
Usage: .Ao symbol Ac ...
Usage: .Ao math symbol Ac ...
Macros beginning with `%' are not callable but accept multiple arguments in the usual way. Only the `.macro ' is handled properly as a parameter; other macros will cause strange output. `.%B' and `.%T' can be used outside of the `.Rs/.
Example:
.Rs .%A "Matthew Bar" .%A "John Foo" .%T "Implementation Notes on foobar(1)" .%R "Technical Report ABC-DE-12-345" .%Q "Drofnats College, Nowhere" .%D "April 1991" .Re
produces
- "Matthew Bar" "John Foo" "Implementation Notes on foobar(1)" "Technical Report ABC-DE-12-345" "Drofnats College, Nowhere" "April 1991"
Usage: .Ao symbol Ac ...
Here is an example of `. ' using the space mode macro to turn spacing off:
.Sm off .It Xo Sy I Ar operation .No \en Ar count No \en .Xc .Sm on
produces
- I operation \n count \n
.Sm off .It Cm S No / Ar old_pattern Xo .No / Ar new_pattern .No / Op Cm g .Xc .Sm on
produces
- S / old_pattern / new_pattern / [g ]
.It Xo .Ic .ifndef .Oo \&! Oc Ns Ar variable Oo .Ar operator variable ... .Oc Xc
produces
- .ifndef [! variable [operator variable ... ]
- ]
The default width is 8n.
`. - first ' prints `-' , then all its arguments. Li ".Sh LIBRARY" This section is for section two and three function calls. It should consist of a single `.Lb macro ' call; see Sx Library Names . Li ".Sh SYNOPSIS" The Sx SYNOPSIS section describes the typical usage of the subject of a man page. The macros required are either `.groff Fl m Ns Cm doc Ar ' `., ' or `.Fn (and ' possibly `.Fo , ' `.Fc , ' `.Fd , ' and `.Ft ) ' The function name macro `.Fn is ' required for manual page sections~2 and~3; the command and general name macro `.groff Fl m Ns Cm doc Ar ' is required for sections 1, 5, 6, 7, and~8. Section~4 manuals require a `.groff Fl m Ns Cm doc Ar ' `.Fd or ' a `.configuration ' device usage macro. Several other macros may be necessary to produce the synopsis line as shown below:
cat [-benstuv ] [- ] file ...
The following macros were used:
".cat
".[-benstuv ]
".[Fl]
.file ...Li ".Sh DESCRIPTION" In most cases the first text in the Sx DESCRIPTION section is a brief paragraph on the command, function or file, followed by a lexical list of options and respective explanations. To create such a list, the `.
' (begin list), `.
' (end list) macros are used (see Sx Lists and Columns below). Li ".Sh IMPLEMENTATION NOTES" Implementation specific information should be placed here. Li ".Sh RETURN VALUES" Sections 2, 3 and~9 function return values should go here. The `.Rv macro ' may be used to generate text for use in the Sx RETURN VALUES section for most section 2 and 3 library functions; see Sx Return Values .
It is recommended that the cross references are sorted on the section number, then alphabetically on the names within a section, and placed in that order and comma separated. Example:
ls(1), ps(1), group(5), passwd(5) Li ".Sh STANDARDS" If the command, library function or file adheres to a specific implementation such as St -p1003.2 or St -ansiC this should be noted here. If the command does not adhere to any standard, its history should be noted in the Sx HISTORY section. Li ".Sh HISTORY" Any command which does not adhere to any specific standards should be outlined historically in this section. Li ".Sh AUTHORS" Credits should be placed here. The `.An macro ' should be used to specify the name(s) of the person(s). Li ".Sh BUGS" Blatant problems with the topic go here.
.Sh "PAGE STRUCTURE DOMAIN"
' paragraph command may be used to specify a line space where necessary. The macro is not necessary after a `.
' or `. ' macro (which both assert a vertical distance unless the -compact flag is given).
The macro is neither callable nor parsed and takes no arguments; an alternative name is `.Lp '
Both macros are neither callable nor parsed.
More work needs to be done with the keep macros; specifically, a -line option should be added.
The above was produced by: .D1 -ldghfstru
example' macro has been used throughout this file. It allows the indentation (display) of one line of text. Its default font is set to constant width (literal). `.
is' parsed but not callable.
% ls -ldg /usr/local/bin
The above was produced by: . % ls -ldg /usr/local/bin
macros,' so one is guaranteed the two types of displays will line up. The indentation value is normally set to~6n or about two thirds of an inch (six constant width characters).
If Ao string Ac is a valid numeric expression instead ( with a scale indicator other than `u ' use that value for indentation. The most useful scale indicators are `m' and `n' specifying the so-called and En square This is approximately the width of the letters `m' and `n' respectively of the current font (for nroff output, both scale indicators give the same values). If Ao string Ac isn't a numeric expression, it is tested whether it is an -mdoc macro name, and the default offset value associated with this macro is used. Finally, if all tests fail, the width of Ao string Ac (typeset with a fixed-width font) is taken as the offset.
' begin-list macro. Items within the list are specified with the `.
' macro. Lists may be nested within themselves and within displays. The use of columns inside of lists or lists inside of columns is unproven.
In addition, several list attributes may be specified such as the width of a tag, the list offset, and compactness (blank lines between items allowed or disallowed). Most of this document has been formatted with a tag style list ( -tag
It has the following syntax forms:
And now a detailed description of the list types.
.Bl -bullet -offset indent -compact .It Bullet one goes here. .It Bullet two here. .El
Produces:
.Bl -dash -offset indent -compact .It Dash one goes here. .It Dash two here. .El
Produces:
.Bl -enum -offset indent -compact .It Item one goes here. .It And item two here. .El
The result:
If you want to nest enumerated lists, use the -nested flag (starting with the second-level list):
.Bl -enum -offset indent -compact .It Item one goes here .Bl -enum -nested -compact .It Item two goes here. .It And item three here. .El .It And item four here. .El
Result:
.Bl -item -offset indent .It Item one goes here. Item one goes here. Item one goes here. .It Item two here. Item two here. Item two here. .El
Produces:
The raw text:
.Bl -tag -width "PPID" -compact -offset indent .It SL sleep time of the process (seconds blocked) .It PAGEIN number of disk .Tn I/O Ns 's resulting from references by the process to pages not loaded in core. .It UID numerical user-id of process owner .It PPID numerical id of parent of process priority (non-positive when in non-interruptible wait) .El
Example:
.Bl -diag .It You can't use Sy here. The message says all. .El
produces
And the unformatted text which created it:
.Bl -hang -offset indent .It Em Hanged labels appear similar to tagged lists when the label is smaller than the label width. .It Em Longer hanged list labels blend into the paragraph unlike tagged paragraph labels. .El
The raw text:
.Bl -ohang -offset indent .It Sy SL sleep time of the process (seconds blocked) .It Sy PAGEIN number of disk .Tn I/O Ns 's resulting from references by the process to pages not loaded in core. .It Sy UID numerical user-id of process owner .It Sy PPID numerical id of parent of process priority (non-positive when in non-interruptible wait) .El
Here is the source text which produced the above example:
.Bl -inset -offset indent .It Em Tag The tagged list (also called a tagged paragraph) is the most common type of list used in the Berkeley manuals. .It Em Diag Diag lists create section four diagnostic lists and are similar to inset lists except callable macros are ignored. .It Em Hang Hanged labels are a matter of taste. .It Em Ohang Overhanging labels are nice when space is constrained. .It Em Inset Inset labels are useful for controlling blocks of paragraphs and are valuable for converting .Nm -mdoc manuals to other formats. .El
Each `.
The table:
was produced by:
.Bl -column -offset indent ".Sy String" ".Sy Nroff" ".Sy Troff" .It Sy String Ta Sy Nroff Ta Sy Troff .It Li <= Ta <= Ta \*(<= .It Li >= Ta >= Ta \*(>= .El
Other keywords:
Example:
.Bl -tag -width ".Fl test Ao Ar string Ac" .It Fl test Ao Ar string Ac This is a longer sentence to show how the .Fl width flag works in combination with a tag list. .El
gives:
(Note that the current state of -mdoc is saved before Aq Ar string is interpreted; afterwards, all variables are restored again. However, boxes (used for enclosures) can't be saved in GNU troff(1); as a consequence, arguments must always be balanced to avoid nasty errors. For example, do not write `.Ao string ' but `.Ao string ' Xc instead if you really need only an opening angle bracket.)
Otherwise, if Aq Ar string is a valid numeric expression ( with a scale indicator other than `u ' use that value for indentation. The most useful scale indicators are `m' and `n' specifying the so-called and En square This is approximately the width of the letters `m' and `n' respectively of the current font (for nroff output, both scale indicators give the same values). If Aq Ar string isn't a numeric expression, it is tested whether it is an -mdoc macro name, and the default width value associated with this macro is used. Finally, if all tests fail, the width of Aq Ar string (typeset with a fixed-width font) is taken as the width.
If a width is not specified for the tag list type, every time `.
or' `. ' is used. If Aq Ar string is a valid numeric expression instead ( with a scale indicator other than `u ' use that value for indentation. The most useful scale indicators are `m' and `n' specifying the so-called and En square This is approximately the width of the letters `m' and `n' respectively of the current font (for nroff output, both scale indicators give the same values). If Aq Ar string isn't a numeric expression, it is tested whether it is an -mdoc macro name, and the default offset value associated with this macro is used. Finally, if all tests fail, the width of Aq Ar string (typeset with a fixed-width font) is taken as the offset.
is currently in beta test.
It is neither callable nor parsed and takes no arguments.
Usage: .Ao function return value Ac ...
Don't use this macro. It allows a break right before the return value (usually a single digit) which is bad typographical behaviour. Use `\~' to tie the return value to the previous word.
Usage: .Hf Ao file AcIt is neither callable nor parsed.
Its default width is 6n.
Usage: .
If space mode is off, no spaces between macro arguments are inserted. If called without a parameter (or if the next parameter is neither `on' nor `off' , `. ' toggles space mode.
Ud
It is neither callable nor parsed and takes no arguments.
The names of the columns Nroff and Troff are a bit misleading; Nroff shows the ASCII representation, while Troff gives the best glyph form available. For example, a Unicode enabled TTY - device will have proper glyph representations for all strings, whereas the enhancement for a Latin1 TTY - device is only the plus-minus sign.
String names which consist of two characters can be written as `\*(xx' ; string names which consist of one character can be written as `\*x' A generic syntax for a string name of any length is `\*[xxx]' (this is a GNU troff(1) extension). # #===================================================================== #
The only remaining debugging macro is `.Rd which ' yields a register dump of all global registers and strings. A normal user will never need it.
groff -Tlatin1 -rcR=0 -mdoc foo.man > foo.txt
For double-sided printing, set register `D' to~1:
groff -Tps -rD1 -mdoc foo.man > foo.ps
To change the document font size to 11pt or 12pt, set register `S' accordingly:
groff -Tdvi -rS11 -mdoc foo.man > foo.dvi
Register `S' is ignored for TTY devices.
The line and title length can be changed by setting the registers `LL' and `LT' , respectively:
groff -Tutf8 -rLL=100n -rLT=100n -mdoc foo.man | less
If not set, both registers default to 78n for TTY devices and 6.5i otherwise.
`.groff Fl m Ns Cm doc Ar ' font should be changed in Sx NAME section.
`.Fn needs ' to have a check to prevent splitting up if the line length is too short. Occasionally it separates the last parenthesis, and sometimes looks ridiculous if a line is in fill mode.
The list and display macros do not do any keeps and certainly should be able to.