Интерактивная система просмотра системных руководств (man-ов)
groff_diff (7)
>> groff_diff (7) ( FreeBSD man: Макропакеты и соглашения )
groff_diff (7) ( Linux man: Макропакеты и соглашения )
NAME
groff_diff - differences between GNU troff and classical troff
DESCRIPTION
This manual page describes the language differences between
groff,
the GNU
roff
text processing system and the classical
roff
formatter of the freely available Unix~7 of the 1970s, documented in
the
Troff User's Manual
by
Osanna
and
Kernighan.
This inludes the roff language as well as the intermediate output
format (troff output).
The section
SEE ALSO
gives pointers to both the classical
roff
and the modern
groff
documentation.
GROFF LANGUAGE
In this section, all additional features of
groff
compared to the classical Unix~7
troff
are described in detail.
Long names
The names of number registers, fonts, strings/:macros/:diversions,
special characters (glyphs), and colors can be of any length.
In escape sequences, additionally to the classical
(xx
construction for a two-character name, you can use
[xxx]
for a name of arbitrary length.
[rs][xxx]
Print the special character (glyph) called
xxx.
[rs][comp1 comp2 ...]
Print composite glyph consisting of multiple components.
Example: `[rs][A~ho]' is capital letter A with ogonek which finally maps
to glyph name `u0041_0328'.
See the
groff info file
for details how a glyph name for a composite glyph is constructed, and
groff_char(7)
for list of glyph name components used composite glyph names.
[rs]f[xxx]
Set font
xxx.
Additionally,
[rs]f[]
is a new syntax equal to
[rs]fP,
i.e., to return to the previous font.
[rs]*[xxx arg1 arg2 ...]
Interpolate string
xxx,
taking
arg1,
arg2,
...
as arguments.
[rs]n[xxx]
Interpolate number register
xxx.
Fractional pointsizes
A
scaled point
is equal to
1/sizescale
points, where
sizescale
is specified in the
DESC
file (1 by default).
There is a new scale indicator
z
that has the effect of multiplying by sizescale.
Requests and escape sequences in troff interpret arguments that
represent a pointsize as being in units of scaled points, but they
evaluate each such argument using a default scale indicator of
z.
Arguments treated in this way are the argument to the
ps
request, the third argument to the
cs
request, the second and fourth arguments to the
tkf
request, the argument to the
[rs]H
escape sequence, and those variants of the
[rs]s
escape sequence that take a numeric expression as their argument.
For example, suppose sizescale is 1000; then a scaled point will be
equivalent to a millipoint; the call
.ps 10.25
is equivalent to
.ps 10.25z
and so sets the pointsize to 10250 scaled points, which is equal to
10.25 points.
The number register
[rs]n[.s]
returns the pointsize in points as decimal fraction.
There is also a new number register
[rs]n[.ps]
that returns the pointsize in scaled points.
It would make no sense to use the
z
scale indicator in a numeric expression whose default scale indicator
was neither
u
nor
z,
and so
troff
disallows this.
Similarly it would make no sense to use a scaling indicator other than
z
or
u
in a numeric expression whose defaulSegmentation fault (core dumped)