'\" e .TH GROFF_DIFF 7 "20 December 2018" "groff 1.22.4.rc5" .SH NAME groff_diff \- differences between GNU troff and classical troff . .\" groff_diff.man: .\" Source file position: /man/groff_diff.man .\" Installed position: /share/man/man7/groff_diff.7 . . .\" Save and disable compatibility mode (for, e.g., Solaris 10/11). .do nr groff_diff_C \n[.C] .cp 0 . . .\" ==================================================================== .\" Legal Terms .\" ==================================================================== .\" .\" Copyright (C) 1989-2018 Free Software Foundation, Inc. .\" .\" This file is part of groff, the GNU roff type-setting system. .\" .\" Permission is granted to copy, distribute and/or modify this .\" document under the terms of the GNU Free Documentation License, .\" Version 1.3 or any later version published by the Free Software .\" Foundation; with no Invariant Sections, with no Front-Cover Texts, .\" and with no Back-Cover Texts. .\" .\" A copy of the Free Documentation License is included as a file .\" called FDL in the main directory of the groff source package. .\" .\" A copy of the GNU Free Documentation License is also available in this .\" Debian package as /usr/share/doc/groff/copyright. . . .\" ==================================================================== .\" Local definitions .\" ==================================================================== . .\" define a string tx for the TeX logo .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X .el .ds tx TeX . . .\" from old groff_out.man .ie \n(.g \ . ds ic \/ .el \ . ds ic \^ . .\" ellipsis .ds ellipsis \&.\|.\|.\& . . .\" ==================================================================== .SH DESCRIPTION .\" ==================================================================== . This manual page describes the language differences between .IR groff , the GNU .I roff text processing system, and the classical .I roff formatter of the freely available Unix\~7 of the 1970s, documented in the .I Troff User's Manual by .I Ossanna and .IR Kernighan . . This includes the roff language as well as the intermediate output format (troff output). . . .P Section \[lq]See Also\[rq] below gives pointers to both the classical .I roff and the modern .I groff documentation. . . .\" ==================================================================== .SH "GROFF LANGUAGE" .\" ==================================================================== . In this section, all additional features of .I groff compared to the classical Unix\~7 .I troff are described in detail. . . .\" ==================================================================== .SS "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 \[oq]\fB(\fP\,\fIxx\/\fP\[cq] construction for a two-character glyph name, you can use \[oq]\fB[\fP\,\fIxxx\/\fP\fB]\fP\[cq] for a name of arbitrary length. . .TP .BI \[rs][ xxx ] Print the special character (glyph) called .IR xxx . . .TP .BI \[rs][ "comp1 comp2 \*[ellipsis]" ] Print composite glyph consisting of multiple components. . Example: \[oq]\[rs][A\~ho]\[cq] is capital letter A with ogonek which finally maps to glyph name \[oq]u0041_0328\[cq]. . See .IR "Groff: The GNU Implementation of troff" , the .I groff Texinfo manual, for details of how a glyph name for a composite glyph is constructed, and .BR groff_char (7) for a list of glyph name components used in composite glyph names. . .TP .BI \[rs]f[ xxx ] Set font .IR xxx . . Additionally, .B \[rs]f[] is a new syntax form equal to .BR \[rs]fP , i.e., to return to the previous font. . .TP .BI \[rs]*[ "xxx arg1 arg2 \*[ellipsis]" ] Interpolate string .IR xxx , taking .IR arg1 , .IR arg2 , .IR \*[ellipsis] , as arguments. . .TP .BI \[rs]n[ xxx ] Interpolate number register .IR xxx . . . .\" ==================================================================== .SS "Fractional point sizes" .\" ==================================================================== . A .I scaled point is equal to .B 1/sizescale points, where .B sizescale is specified in the .I DESC file (1 by default). . There is a new scale indicator\~\c .B z that has the effect of multiplying by sizescale. . Requests and escape sequences in troff interpret arguments that represent a point size as being in units of scaled points, but they evaluate each such argument using a default scale indicator of\~\c .BR z . Arguments treated in this way are the argument to the .B ps request, the third argument to the .B cs request, the second and fourth arguments to the .B tkf request, the argument to the .B \[rs]H escape sequence, and those variants of the .B \[rs]s escape sequence that take a numeric expression as their argument. . . .P For example, suppose sizescale is 1000; then a scaled point is equivalent to a millipoint; the call .B .ps\ 10.25 is equivalent to .B .ps\ 10.25z and so sets the point size to 10250 scaled points, which is equal to 10.25 points. . . .P The number register .B \[rs]n[.s] returns the point size in points as decimal fraction. . There is also a new number register .B \[rs]n[.ps] that returns the point size in scaled points. . . .P It would make no sense to use the .BR z \~\c scale indicator in a numeric expression whose default scale indicator was neither .B u nor\~\c .BR z , and so .B troff disallows this. . Similarly it would make no sense to use a scaling indicator other than .B z or\~\c .B u in a numeric expression whose default scale indicator was\~\c .BR z , and so .B troff disallows this as well. . .P There is also new scale indicator\~\c .B s which multiplies by the number of units in a scaled point. . So, for example, .B \[rs]n[.ps]s is equal to .BR 1m . Be sure not to confuse the .B s and .BR z \~\c scale indicators. . . .\" ==================================================================== .SS "Numeric expressions" .\" ==================================================================== . Spaces are permitted in a number expression within parentheses. . . .P .B M indicates a scale of 100ths of an em. .B f indicates a scale of 65536 units, providing fractions for color definitions with the .B defcolor request. . For example, 0.5f = 32768u. . .TP .IB e1 >? e2 The maximum of .I e1 and .IR e2 . . .TP .IB e1