This section documents parts of
gtroff which cannot (yet) be
categorized elsewhere in this manual.
Print line numbers. start is the line number of the next output line. inc indicates which line numbers are printed. For example, the value 5 means to emit only line numbers which are multiples of 5; this defaults to 1. space is the space to be left between the number and the text; this defaults to one digit space. The fourth argument is the indentation of the line numbers, defaulting to zero. Both space and indent are given as multiples of digit spaces; they can be negative also. Without any arguments, line numbers are turned off.
gtroffreserves three digit spaces for the line number (which is printed right-justified) plus the amount given by indent; the output lines are concatenated to the line numbers, separated by space, and without reducing the line length. Depending on the value of the horizontal page offset (as set with the
porequest), line numbers which are longer than the reserved space stick out to the left, or the whole line is moved to the right.
Parameters corresponding to missing arguments are not changed; any non-digit argument (to be more precise, any argument starting with a character valid as a delimiter for identifiers) is also treated as missing.
If line numbering has been disabled with a call to
nmwithout an argument, it can be reactivated with ‘.nm +0’, using the previously active line numbering parameters.
The parameters of
nmare associated with the current environment (see Environments). The current output line number is available in the number register
ln..po 1m .ll 2i This test shows how line numbering works with groff. .nm 999 This test shows how line numbering works with groff. .br .nm xxx 3 2 .ll -\w'0'u This test shows how line numbering works with groff. .nn 2 This test shows how line numbering works with groff.
And here the result:This test shows how line numbering works 999 with groff. This 1000 test shows how line 1001 numbering works with 1002 groff. This test shows how line numbering works with groff. This test shows how 1005 line numbering works with groff.
Print a margin character to the right of the text.1 The first argument is the glyph to be printed. The second argument is the distance away from the right margin. If missing, the previously set value is used; default is 10pt). For text lines that are too long (that is, longer than the text length plus dist), the margin character is directly appended to the lines.
With no arguments the margin character is turned off. If this occurs before a break, no margin character is printed.
For compatibility with AT&T
troff, a call to
mcto set the margin character can't be undone immediately; at least one line gets a margin character. Thus.ll 1i .mc \[br] .mc xxx .br xxx
producesxxx | xxx
The margin character is associated with the current environment (see Environments).
This is quite useful for indicating text that has changed, and, in fact, there are programs available for doing this (they are called
changebarand can be found in any ‘comp.sources.unix’ archive)..ll 3i .mc | This paragraph is highlighted with a margin character. .sp Note that vertical space isn't marked. .br \& .br But we can fake it with `\&'.
Result:This paragraph is highlighted | with a margin character. | Note that vertical space isn't | marked. | | But we can fake it with `\&'. |
Retrieve the bounding box of the PostScript image found in filename. The file must conform to Adobe's Document Structuring Conventions (DSC); the command searches for a
%%BoundingBoxcomment and extracts the bounding box values into the number registers
ury. If an error occurs (for example,
psbbcannot find the
%%BoundingBoxcomment), it sets the four number registers to zero.
The search path for filename can be controlled with the -I command line option.
 Margin character is a misnomer since it is an output glyph.