| 1 |
.TH groff_out 5 "2026-04-22" "groff 1.24.1" |
| 2 |
.SH Name |
| 3 |
groff_out \- GNU |
| 4 |
.I roff |
| 5 |
device-independent page description language |
| 6 |
. |
| 7 |
. |
| 8 |
.\" XXX: This page needs review and editing. |
| 9 |
.\" ==================================================================== |
| 10 |
.\" Legal Terms |
| 11 |
.\" ==================================================================== |
| 12 |
.\" |
| 13 |
.\" Copyright 1989-2024 Free Software Foundation, Inc. |
| 14 |
.\" |
| 15 |
.\" This file is part of groff, the GNU roff typesetting system. |
| 16 |
.\" |
| 17 |
.\" Permission is granted to copy, distribute and/or modify this |
| 18 |
.\" document under the terms of the GNU Free Documentation License, |
| 19 |
.\" Version 1.3 or any later version published by the Free Software |
| 20 |
.\" Foundation; with no Invariant Sections, with no Front-Cover Texts, |
| 21 |
.\" and with no Back-Cover Texts. |
| 22 |
.\" |
| 23 |
.\" A copy of the Free Documentation License is included as a file |
| 24 |
.\" called FDL in the main directory of the groff source package. |
| 25 |
.\" |
| 26 |
.\" A copy of the GNU Free Documentation License is also available in this |
| 27 |
.\" Debian package as /usr/share/doc/groff/copyright. |
| 28 |
. |
| 29 |
. |
| 30 |
.\" Save and disable compatibility mode (for, e.g., Solaris 10/11). |
| 31 |
.do nr *groff_groff_out_5_man_C \n[.cp] |
| 32 |
.cp 0 |
| 33 |
. |
| 34 |
.\" Define fallback for groff 1.23's MR macro if the system lacks it. |
| 35 |
.nr do-fallback 0 |
| 36 |
.if !\n(.f .nr do-fallback 1 \" mandoc |
| 37 |
.if \n(.g .if !d MR .nr do-fallback 1 \" older groff |
| 38 |
.if !\n(.g .nr do-fallback 1 \" non-groff *roff |
| 39 |
.if \n[do-fallback] \{\ |
| 40 |
. de MR |
| 41 |
. ie \\n(.$=1 \ |
| 42 |
. I \%\\$1 |
| 43 |
. el \ |
| 44 |
. IR \%\\$1 (\\$2)\\$3 |
| 45 |
. . |
| 46 |
.\} |
| 47 |
.rr do-fallback |
| 48 |
. |
| 49 |
. |
| 50 |
.\" ==================================================================== |
| 51 |
.\" Setup |
| 52 |
.\" ==================================================================== |
| 53 |
. |
| 54 |
.\" ================= Document configuration |
| 55 |
. |
| 56 |
.\" Number register to decide whether the commands '{' and '}' are used |
| 57 |
.\" 0: disable (current default); 1: enable |
| 58 |
.nr @USE_ENV_STACK 0 |
| 59 |
. |
| 60 |
.ig |
| 61 |
Unfortunately, old versions of groff used an illogical position change |
| 62 |
after some D\~commands (Dp, DP, Dt). If the register |
| 63 |
@STUPID_DRAWING_POSITIONING is 1 (current default) then change position |
| 64 |
after these commands, otherwise the position is not changed. |
| 65 |
.. |
| 66 |
.nr @STUPID_DRAWING_POSITIONING 1 |
| 67 |
. |
| 68 |
.\" ================= Semantical definitions |
| 69 |
. |
| 70 |
.nr @maxcolor 65536 |
| 71 |
.ds @backslash \[rs]\" |
| 72 |
.ds @linebreak \fR\[la]line-break\[ra]\fP\" |
| 73 |
. |
| 74 |
.\" Begin of macro definitions |
| 75 |
. |
| 76 |
.de offset |
| 77 |
.RI ( \,\\$1\/ ,\ \,\\$2\/ )\\$3 |
| 78 |
.. |
| 79 |
.de indexed_offset |
| 80 |
.offset \fI\\$1\/\fP\d\s-3\\$2\s+3\u\x'\n[.v]/4' \fI\\$3\/\fP\ |
| 81 |
\d\s-3\\$4\s+3\u\x'\n[.v]/4' \\$5\x'\n[.v]/4'\\$6 |
| 82 |
.. |
| 83 |
.\" format: .command <name> "<arguments>" <punctuation> |
| 84 |
.de command |
| 85 |
\fB\\$1\fP\ \fI\,\\$2\/\fP\\$3 |
| 86 |
.. |
| 87 |
.\" format: .D-command <subcommand> "<arguments>" |
| 88 |
.de D-command |
| 89 |
\fBD\\$1\fP\ \fI\,\\$2\/\fP\|\*[@linebreak] |
| 90 |
.. |
| 91 |
. |
| 92 |
.\" We set these as troff micromotions rather than eqn because \d and \u |
| 93 |
.\" can be lifted to XML subscript/superscript tags. Don't change |
| 94 |
.\" these to a parameterized string, man2html won't handle that. |
| 95 |
.ds hv1 \fIh\d\s-3\&1\s+3\u\~v\d\s-3\&1\s+3\u\fP\x'\n[.v]/4' |
| 96 |
.ds hv2 \fIh\d\s-3\&2\s+3\u\~v\d\s-3\&2\s+3\u\fP\x'\n[.v]/4' |
| 97 |
.ds hvn \fIh\d\s-3\&n\s+3\u\~v\d\s-3\&n\s+3\u\fP\x'\n[.v]/4' |
| 98 |
. |
| 99 |
.de Da-command |
| 100 |
\fBDa\fP\ \*[hv1] \*[hv2]\|\*[@linebreak] |
| 101 |
.. |
| 102 |
.\" graphics command .D with a variable number of arguments |
| 103 |
.\" format: .D-multiarg <subcommand> |
| 104 |
.de D-multiarg |
| 105 |
\fBD\\$1\fP\ \*[hv1] \*[hv2] \&.\|.\|.\& \*[hvn]\|\*[@linebreak] |
| 106 |
.. |
| 107 |
.\" format: .x-command <subname> "<arguments>" |
| 108 |
.de x-command |
| 109 |
\fBx\\$1\fP\ \fI\\$2\fP\|\*[@linebreak] |
| 110 |
.. |
| 111 |
.de xsub |
| 112 |
.RI "(" "\\$1" " control command)" |
| 113 |
.br |
| 114 |
.. |
| 115 |
.\" End of macro definitions |
| 116 |
. |
| 117 |
. |
| 118 |
.\" ==================================================================== |
| 119 |
.SH Description |
| 120 |
.\" ==================================================================== |
| 121 |
. |
| 122 |
.\" BEGIN Keep parallel with introductory paragraph of the "Language |
| 123 |
.\" Concepts" node in doc/groff.texi.in. |
| 124 |
The fundamental operation of the GNU |
| 125 |
.I troff \" GNU |
| 126 |
formatter, |
| 127 |
.MR \%troff 1 , |
| 128 |
is the translation of the |
| 129 |
.MR groff 7 |
| 130 |
input language |
| 131 |
into a series of instructions concerned primarily |
| 132 |
with placing glyphs or geometric objects |
| 133 |
at specific positions on a rectangular page. |
| 134 |
. |
| 135 |
In the following discussion, |
| 136 |
the term |
| 137 |
.I command |
| 138 |
refers to this device-independent output language, |
| 139 |
never to the language intended for use by document authors. |
| 140 |
. |
| 141 |
Device-independent output commands comprise several categories: |
| 142 |
glyph output; |
| 143 |
font, |
| 144 |
color, |
| 145 |
and text size selection; |
| 146 |
motion of the drawing position; |
| 147 |
page advancement; |
| 148 |
drawing of geometric primitives; |
| 149 |
and device extension commands, |
| 150 |
a catch-all for other operations. |
| 151 |
. |
| 152 |
The last includes directives to start and stop output, |
| 153 |
identify the intended output device, |
| 154 |
and embed URL hyperlinks in supported output formats. |
| 155 |
.\" END Keep parallel with introductory paragraph of the "Language |
| 156 |
.\" Concepts" node in doc/groff.texi.in. |
| 157 |
. |
| 158 |
. |
| 159 |
.\" ==================================================================== |
| 160 |
.SS Background |
| 161 |
.\" ==================================================================== |
| 162 |
. |
| 163 |
.\" BEGIN Keep parallel with paragraphs after the first in the "GNU |
| 164 |
.\" troff Output" node in doc/groff.texi.in. |
| 165 |
As |
| 166 |
.MR groff 1 |
| 167 |
is a wrapper program around GNU |
| 168 |
.I troff \" GNU |
| 169 |
and automatically calls an output driver, |
| 170 |
users seldom encounter this format under normal circumstances. |
| 171 |
. |
| 172 |
.I groff |
| 173 |
offers the option |
| 174 |
.B \-Z |
| 175 |
to inhibit postprocessing such that GNU |
| 176 |
.IR troff 's \" GNU |
| 177 |
output is sent to the standard output stream just as it is when running |
| 178 |
GNU |
| 179 |
.I troff \" GNU |
| 180 |
directly. |
| 181 |
. |
| 182 |
. |
| 183 |
.P |
| 184 |
The purpose of device-independent output |
| 185 |
is to facilitate the development of postprocessors |
| 186 |
by providing a common programming interface for all devices. |
| 187 |
. |
| 188 |
It is a distinct, |
| 189 |
and much simpler, |
| 190 |
language from that of the formatter, |
| 191 |
.IR troff . \" generic |
| 192 |
The device-independent output can be thought of |
| 193 |
as a \[lq]page description language\[rq]. |
| 194 |
. |
| 195 |
. |
| 196 |
.P |
| 197 |
In the following discussion, |
| 198 |
the term |
| 199 |
.I "troff output" |
| 200 |
describes what is output by GNU |
| 201 |
.IR troff , \" GNU |
| 202 |
while |
| 203 |
.I "page description" |
| 204 |
denotes the language accepted by the parser that interprets this output |
| 205 |
for the output drivers. |
| 206 |
. |
| 207 |
This parser handles whitespace more flexibly than AT&T |
| 208 |
.IR troff 's \" AT&T |
| 209 |
implementation, |
| 210 |
recognizes a GNU extension to the language, |
| 211 |
and supports a legacy compressed encoding of a subset of commands |
| 212 |
for compatibility; |
| 213 |
otherwise, |
| 214 |
the formats are the same. |
| 215 |
. |
| 216 |
(The parser for device-independent output can be found in the |
| 217 |
.I groff |
| 218 |
sources at |
| 219 |
.IR \%src/\:\%libs/\:\%libdriver/\:\%input.cpp .) |
| 220 |
. |
| 221 |
. |
| 222 |
.P |
| 223 |
When Brian Kernighan designed AT&T |
| 224 |
.IR troff 's \" AT&T |
| 225 |
device-independent page description language circa 1980, |
| 226 |
he had to balance |
| 227 |
readability and maintainability against severe constraints on file size |
| 228 |
and transmission speed to the output device. |
| 229 |
. |
| 230 |
A decade later, |
| 231 |
when James Clark wrote |
| 232 |
.IR groff , |
| 233 |
these constraints were no longer as tight. |
| 234 |
.\" END Keep parallel with paragraphs after the first in the "gtroff |
| 235 |
.\" Output" node in doc/groff.texi.in. |
| 236 |
. |
| 237 |
. |
| 238 |
.\" ==================================================================== |
| 239 |
.SS Syntax |
| 240 |
.\" ==================================================================== |
| 241 |
. |
| 242 |
.IR roff 's |
| 243 |
page description language is a sequence of |
| 244 |
.I tokens: |
| 245 |
single-letter commands or their arguments. |
| 246 |
Some commands accept a subcommand as a first argument, |
| 247 |
followed by one or more further arguments. |
| 248 |
. |
| 249 |
. |
| 250 |
.P |
| 251 |
AT&T device-independent |
| 252 |
.I troff \" AT&T |
| 253 |
used whitespace minimally when producing output. |
| 254 |
. |
| 255 |
GNU |
| 256 |
.IR troff , \" GNU |
| 257 |
in contrast, |
| 258 |
attempts to make its output more human-readable. |
| 259 |
. |
| 260 |
The whitespace characters\[em]tab, |
| 261 |
space, |
| 262 |
and newline\[em]are always meaningful. |
| 263 |
. |
| 264 |
They are never used to represent spacing in the document; |
| 265 |
that is done with horizontal |
| 266 |
.RB ( h ,\~ H ) |
| 267 |
and vertical |
| 268 |
.RB ( v ,\~ V ) |
| 269 |
positioning commands. |
| 270 |
. |
| 271 |
Any sequence of space and/or tab characters is equivalent to a single |
| 272 |
space, |
| 273 |
separating commands from arguments and arguments from each other. |
| 274 |
. |
| 275 |
Space is required only where omitting it would cause ambiguity. |
| 276 |
. |
| 277 |
A line break separates commands. |
| 278 |
. |
| 279 |
The comment character is a pound/hash sign |
| 280 |
.RB ( # ), |
| 281 |
and marks the remainder of the line as a comment. |
| 282 |
. |
| 283 |
A line comprising only whitespace after comment removal does nothing but |
| 284 |
separate input tokens. |
| 285 |
. |
| 286 |
. |
| 287 |
.P |
| 288 |
For example, |
| 289 |
the relative horizontal motion command |
| 290 |
.RB ( h ) |
| 291 |
and the command to write one glyph |
| 292 |
.RB ( c ), |
| 293 |
each take a single argument; |
| 294 |
the former a signed integer, |
| 295 |
and the latter a printable ISO\~646/\[lq]ASCII\[rq] character. |
| 296 |
. |
| 297 |
A series of such commands could validly occur without spaces |
| 298 |
on an input line, |
| 299 |
but GNU |
| 300 |
.I troff \" GNU |
| 301 |
follows each with a newline. |
| 302 |
. |
| 303 |
. |
| 304 |
.P |
| 305 |
Some commands have a more complex syntax; |
| 306 |
the GNU |
| 307 |
.I troff \" GNU |
| 308 |
extension command for writing glyph sequences |
| 309 |
.RB ( t ) |
| 310 |
accepts a variable number of arguments. |
| 311 |
Those that draw geometric objects |
| 312 |
.RB ( D ) |
| 313 |
or control the device |
| 314 |
.RB ( x ) |
| 315 |
furthermore recognize subcommand arguments. |
| 316 |
. |
| 317 |
Such commands thus must end with a newline. |
| 318 |
. |
| 319 |
In GNU |
| 320 |
.I troff, \" GNU |
| 321 |
the device extension (sub)command |
| 322 |
.RB \[lq] x\~X \[rq] |
| 323 |
uniquely supports a line continuation syntax; |
| 324 |
a single input line contains any other. |
| 325 |
. |
| 326 |
. |
| 327 |
.\" ==================================================================== |
| 328 |
.SS "Argument units" |
| 329 |
.\" ==================================================================== |
| 330 |
. |
| 331 |
Some commands accept integer arguments that represent measurements, |
| 332 |
but the scaling units of the formatter's language are never used. |
| 333 |
. |
| 334 |
Most commands assume a scaling unit |
| 335 |
.RB of\~\[lq] u \[rq] |
| 336 |
(basic units), |
| 337 |
and others |
| 338 |
.RB use\~\[lq] s \[rq] |
| 339 |
(scaled points). |
| 340 |
. |
| 341 |
These are defined by the parameters specified in the device's |
| 342 |
.I DESC |
| 343 |
file; |
| 344 |
see |
| 345 |
.MR groff_font 5 |
| 346 |
and, |
| 347 |
for more on scaling units, |
| 348 |
.MR groff 7 |
| 349 |
and |
| 350 |
.IR "Groff: The GNU Implementation of troff" , |
| 351 |
the |
| 352 |
.I groff |
| 353 |
Texinfo manual. |
| 354 |
. |
| 355 |
Color-related commands use dimensionless integers. |
| 356 |
. |
| 357 |
. |
| 358 |
.P |
| 359 |
Note that single characters can have the eighth bit set, as can the |
| 360 |
names of fonts and special characters (this is, glyphs). |
| 361 |
. |
| 362 |
The names of glyphs and fonts can be of arbitrary length. |
| 363 |
. |
| 364 |
A glyph that is to be printed will always be in the current font. |
| 365 |
. |
| 366 |
. |
| 367 |
.P |
| 368 |
A string argument is always terminated by the next whitespace |
| 369 |
character (space, tab, or newline); an embedded |
| 370 |
.B # |
| 371 |
character is regarded as part of the argument, not as the beginning of |
| 372 |
a comment command. |
| 373 |
. |
| 374 |
An integer argument is already terminated by the next non-digit |
| 375 |
character, which then is regarded as the first character of the next |
| 376 |
argument or command. |
| 377 |
. |
| 378 |
. |
| 379 |
.\" ==================================================================== |
| 380 |
.SS "Output structure" |
| 381 |
.\" ==================================================================== |
| 382 |
. |
| 383 |
Device-independent |
| 384 |
.I troff \" system |
| 385 |
output is organized into three parts: |
| 386 |
a header, |
| 387 |
a body, |
| 388 |
and a trailer. |
| 389 |
. |
| 390 |
. |
| 391 |
.P |
| 392 |
The task of the header is to set general device parameters. |
| 393 |
. |
| 394 |
GNU |
| 395 |
.I troff \" GNU |
| 396 |
guarantees that its |
| 397 |
header consists of the following three lines: |
| 398 |
. |
| 399 |
. |
| 400 |
.RS |
| 401 |
.P |
| 402 |
.B x\~T |
| 403 |
.I device |
| 404 |
.br |
| 405 |
.B x\~res |
| 406 |
.I n\~h\~v |
| 407 |
.br |
| 408 |
.B x init |
| 409 |
.RE |
| 410 |
. |
| 411 |
. |
| 412 |
.P |
| 413 |
with the parameters |
| 414 |
.IR n , |
| 415 |
.IR h , |
| 416 |
and |
| 417 |
.I v |
| 418 |
set as outlined in subsection \[lq]Device Control Commands\[rq] below. |
| 419 |
The parser for the device-independent page description language format |
| 420 |
is able to interpret additional whitespace and comments as well even in |
| 421 |
the header. |
| 422 |
. |
| 423 |
. |
| 424 |
.P |
| 425 |
The body contains the document's visible content. |
| 426 |
. |
| 427 |
Once an output driver interprets |
| 428 |
.RB \[lq] "x init" \[rq], |
| 429 |
it prepares to handle commands in general. |
| 430 |
. |
| 431 |
Processing terminates when a |
| 432 |
.RB \[lq] "x stop" \[rq] |
| 433 |
command is encountered; |
| 434 |
the last line of any |
| 435 |
GNU |
| 436 |
.I troff \" GNU |
| 437 |
page description output always contains such a command. |
| 438 |
. |
| 439 |
. |
| 440 |
.P |
| 441 |
Semantically, |
| 442 |
the body is page-oriented. |
| 443 |
. |
| 444 |
The |
| 445 |
.B p |
| 446 |
command starts a new page. |
| 447 |
. |
| 448 |
Positioning, |
| 449 |
writing, |
| 450 |
and drawing commands are performed within a page, |
| 451 |
so they cannot occur before the first |
| 452 |
.B p |
| 453 |
command. |
| 454 |
. |
| 455 |
The output driver reckons absolute positioning |
| 456 |
(by the |
| 457 |
.B H |
| 458 |
and |
| 459 |
.B V |
| 460 |
commands) |
| 461 |
with respect to the current page's origin |
| 462 |
at the top left corner, |
| 463 |
and all other positioning relative to the drawing position on the page. |
| 464 |
. |
| 465 |
. |
| 466 |
.P |
| 467 |
The trailer advances the drawing position to the bottom of the page |
| 468 |
and informs the device that the document |
| 469 |
(or \[lq]job\[rq]) |
| 470 |
has ended. |
| 471 |
. |
| 472 |
. |
| 473 |
.\" ==================================================================== |
| 474 |
.SH "Command reference" |
| 475 |
.\" ==================================================================== |
| 476 |
. |
| 477 |
This section describes all page description output commands, |
| 478 |
both from AT&T |
| 479 |
.I troff \" AT*T |
| 480 |
as well as extension commands issued by |
| 481 |
GNU |
| 482 |
.I troff. \" GNU |
| 483 |
. |
| 484 |
. |
| 485 |
.\" ==================================================================== |
| 486 |
.SS "Comment command" |
| 487 |
.\" ==================================================================== |
| 488 |
. |
| 489 |
.TP |
| 490 |
.BI # anything\c |
| 491 |
\[la]line-break\[ra] |
| 492 |
Apply comment annotation. |
| 493 |
. |
| 494 |
Ignore any characters from the |
| 495 |
.BR # \~character |
| 496 |
up to the next newline. |
| 497 |
. |
| 498 |
Each comment can be preceded by arbitrary syntactical space, |
| 499 |
and every command can be terminated by a comment. |
| 500 |
. |
| 501 |
. |
| 502 |
.\" ==================================================================== |
| 503 |
.SS "Simple commands" |
| 504 |
.\" ==================================================================== |
| 505 |
. |
| 506 |
The commands in this subsection have a command code consisting of a |
| 507 |
single character, taking a fixed number of arguments. |
| 508 |
. |
| 509 |
Most of them are commands for positioning and text writing. |
| 510 |
. |
| 511 |
These commands are smart about whitespace. |
| 512 |
. |
| 513 |
Optionally, |
| 514 |
.I syntactical space |
| 515 |
can be inserted before, after, and between the command letter and its |
| 516 |
arguments. |
| 517 |
. |
| 518 |
All of these commands are stackable, i.e., they can be preceded by |
| 519 |
other simple commands or followed by arbitrary other commands on the |
| 520 |
same line. |
| 521 |
. |
| 522 |
A separating |
| 523 |
.I syntactical space |
| 524 |
is necessary only when two integer arguments would clash or if the |
| 525 |
preceding argument ends with a string argument. |
| 526 |
. |
| 527 |
. |
| 528 |
.if \n[@USE_ENV_STACK]=1 \{\ |
| 529 |
.TP |
| 530 |
.command { |
| 531 |
Open a new environment by copying the current device configuration data |
| 532 |
to the environment stack. |
| 533 |
. |
| 534 |
The current environment is setup by the device specification and |
| 535 |
manipulated by the setting commands. |
| 536 |
. |
| 537 |
. |
| 538 |
.TP |
| 539 |
.command } |
| 540 |
Close the current environment |
| 541 |
(opened by a preceding |
| 542 |
.BR { \~command) |
| 543 |
and restore the previous environment from the environment |
| 544 |
stack as the current device configuration data. |
| 545 |
. |
| 546 |
.\} \" endif @USE_ENV_STACK |
| 547 |
. |
| 548 |
. |
| 549 |
.TP |
| 550 |
.command C id \[la]white-space\[ra] |
| 551 |
Typeset the glyph of the special character |
| 552 |
.IR id . |
| 553 |
. |
| 554 |
Trailing syntactical space is necessary to allow special character names |
| 555 |
of arbitrary length. |
| 556 |
. |
| 557 |
The drawing position is not advanced. |
| 558 |
.\" XXX: Why does it matter that we read its size if we don't advance |
| 559 |
.\" the drawing position? |
| 560 |
.\" its size is read from the font description file. |
| 561 |
. |
| 562 |
. |
| 563 |
.TP |
| 564 |
.command c c |
| 565 |
Typeset the glyph of the ordinary |
| 566 |
.RI character\~ c . |
| 567 |
. |
| 568 |
The drawing position is not advanced. |
| 569 |
.\" XXX: Why does it matter that we read its size if we don't advance |
| 570 |
.\" the drawing position? |
| 571 |
.\" its size is read from the font description file. |
| 572 |
. |
| 573 |
. |
| 574 |
.TP |
| 575 |
.command f n |
| 576 |
Select the font mounted at |
| 577 |
.RI position\~ n . |
| 578 |
. |
| 579 |
.IR n\~ cannot |
| 580 |
be negative. |
| 581 |
. |
| 582 |
. |
| 583 |
.TP |
| 584 |
.command H n |
| 585 |
Horizontally move the drawing position to |
| 586 |
.IR n\~ basic |
| 587 |
units from the left edge of the page. |
| 588 |
. |
| 589 |
.IR n\~ cannot |
| 590 |
be negative. |
| 591 |
. |
| 592 |
. |
| 593 |
.TP |
| 594 |
.command h n |
| 595 |
Move the drawing position right |
| 596 |
.I n |
| 597 |
basic units. |
| 598 |
. |
| 599 |
AT&T |
| 600 |
.I troff \" AT&T |
| 601 |
allowed negative |
| 602 |
.I n; |
| 603 |
GNU |
| 604 |
.I troff \" GNU |
| 605 |
does not produce such values, |
| 606 |
but |
| 607 |
.IR groff 's |
| 608 |
output driver library handles them. |
| 609 |
. |
| 610 |
. |
| 611 |
.TP |
| 612 |
.command m "scheme \f[R][\f[]component\f[R] .\|.\|.]" |
| 613 |
Select the stroke color using the |
| 614 |
.IR component s |
| 615 |
in the color space |
| 616 |
.IR scheme . |
| 617 |
. |
| 618 |
Each |
| 619 |
.I component |
| 620 |
is an integer between 0 and \n[@maxcolor]. |
| 621 |
. |
| 622 |
The quantity of components and their meanings vary with each |
| 623 |
.IR scheme . |
| 624 |
. |
| 625 |
This command is a |
| 626 |
.I groff |
| 627 |
extension. |
| 628 |
. |
| 629 |
. |
| 630 |
.RS |
| 631 |
.TP |
| 632 |
.command mc "cyan magenta yellow" |
| 633 |
Use the CMY color scheme with components |
| 634 |
cyan, |
| 635 |
magenta, |
| 636 |
and yellow. |
| 637 |
. |
| 638 |
. |
| 639 |
.TP |
| 640 |
.command md |
| 641 |
Use the default color |
| 642 |
(no components; |
| 643 |
black in most cases). |
| 644 |
. |
| 645 |
. |
| 646 |
.TP |
| 647 |
.command mg gray |
| 648 |
Use a grayscale color scheme with a component ranging |
| 649 |
between 0 (black) and \n[@maxcolor] (white). |
| 650 |
. |
| 651 |
. |
| 652 |
.TP |
| 653 |
.command mk "cyan magenta yellow black" |
| 654 |
Use the CMYK color scheme with components |
| 655 |
cyan, |
| 656 |
magenta, |
| 657 |
yellow, |
| 658 |
and black. |
| 659 |
. |
| 660 |
. |
| 661 |
.TP |
| 662 |
.command mr "red green blue" |
| 663 |
Use the RGB color scheme with components |
| 664 |
red, |
| 665 |
green, |
| 666 |
and blue. |
| 667 |
.RE |
| 668 |
. |
| 669 |
. |
| 670 |
.TP |
| 671 |
.command N n |
| 672 |
Typeset the glyph with |
| 673 |
.RI index\~ n |
| 674 |
in the current font. |
| 675 |
. |
| 676 |
.IR n\~ is |
| 677 |
normally a non-negative integer. |
| 678 |
. |
| 679 |
The drawing position is not advanced. |
| 680 |
. |
| 681 |
The |
| 682 |
.B html |
| 683 |
and |
| 684 |
.B xhtml |
| 685 |
devices use this command with |
| 686 |
.RI negative\~ n |
| 687 |
to produce unbreakable space; |
| 688 |
the absolute value of |
| 689 |
.I n |
| 690 |
is taken and interpreted in basic units. |
| 691 |
. |
| 692 |
. |
| 693 |
.TP |
| 694 |
.command n b\~a |
| 695 |
Indicate a break. |
| 696 |
. |
| 697 |
No action is performed; |
| 698 |
the command is present to make the output more easily parsed. |
| 699 |
. |
| 700 |
The integers |
| 701 |
.I b |
| 702 |
.RI and\~ a |
| 703 |
describe the vertical space amounts before and after the break, |
| 704 |
respectively. |
| 705 |
. |
| 706 |
GNU |
| 707 |
.I troff \" GNU |
| 708 |
issues this command but |
| 709 |
.IR groff 's |
| 710 |
output driver library ignores it. |
| 711 |
. |
| 712 |
See |
| 713 |
.B v |
| 714 |
and |
| 715 |
.BR V . |
| 716 |
. |
| 717 |
. |
| 718 |
.TP |
| 719 |
.command p n |
| 720 |
Begin a new page, |
| 721 |
setting its number |
| 722 |
.RI to\~ n . |
| 723 |
. |
| 724 |
Each page is independent, |
| 725 |
even from those using the same number. |
| 726 |
. |
| 727 |
The vertical drawing position is set to\~0. |
| 728 |
. |
| 729 |
All positioning, |
| 730 |
writing, |
| 731 |
and drawing commands are interpreted in the context of a page, |
| 732 |
so a |
| 733 |
.BR p \~command |
| 734 |
must precede them. |
| 735 |
. |
| 736 |
. |
| 737 |
.TP |
| 738 |
.command s n |
| 739 |
Set type size to |
| 740 |
.I n |
| 741 |
scaled points |
| 742 |
.RB (unit\~ z |
| 743 |
in GNU |
| 744 |
.IR troff ). \" GNU |
| 745 |
. |
| 746 |
AT&T |
| 747 |
.I troff \" AT&T |
| 748 |
used unscaled points |
| 749 |
.RB ( p ) |
| 750 |
instead; |
| 751 |
see section \[lq]Compatibility\[rq] below. |
| 752 |
. |
| 753 |
. |
| 754 |
.TP |
| 755 |
.command t xyz\f[R]\|.\|.\|.\& \f[R]\[la]white-space\[ra] |
| 756 |
.TQ |
| 757 |
.command t "xyz\f[R]\|.\|.\|.\&\f[] dummy-arg" \[la]white-space\[ra] |
| 758 |
Typeset word |
| 759 |
.IR xyz ; |
| 760 |
that is, |
| 761 |
set a sequence of ordinary glyphs named |
| 762 |
.IR x , |
| 763 |
.IR y , |
| 764 |
.IR z , |
| 765 |
\&.\|.\|.\|, |
| 766 |
terminated by a space or newline; |
| 767 |
an optional second integer argument is ignored |
| 768 |
(this allows the formatter to generate an even number of arguments). |
| 769 |
.\" XXX: Why? |
| 770 |
. |
| 771 |
Each glyph is set at the current drawing position, |
| 772 |
and the position is then advanced horizontally by the glyph's width. |
| 773 |
. |
| 774 |
A glyph's width is read from its metrics in the font description file, |
| 775 |
scaled to the current type size, |
| 776 |
and rounded to a multiple of the horizontal motion quantum. |
| 777 |
. |
| 778 |
Use the |
| 779 |
.B C |
| 780 |
command to emplace glyphs of special characters. |
| 781 |
. |
| 782 |
The |
| 783 |
.BR t \~command |
| 784 |
is a |
| 785 |
.I groff |
| 786 |
extension and is output only for devices whose |
| 787 |
.I DESC |
| 788 |
file contains the |
| 789 |
.B tcommand |
| 790 |
directive; |
| 791 |
see |
| 792 |
.MR groff_font 5 . |
| 793 |
. |
| 794 |
. |
| 795 |
.TP |
| 796 |
.command u "n xyz"\f[R]\|.\|.\|.\& \f[R]\[la]white-space\[ra] |
| 797 |
.TQ |
| 798 |
.command u "xyz\f[R]\|.\|.\|.\&\f[] dummy-arg" \[la]white-space\[ra] |
| 799 |
Typeset word |
| 800 |
.I xyz |
| 801 |
with track kerning. |
| 802 |
. |
| 803 |
As |
| 804 |
.BR t , |
| 805 |
but after placing each glyph, |
| 806 |
the drawing position is further advanced horizontally |
| 807 |
.RI by\~ n |
| 808 |
basic units. |
| 809 |
. |
| 810 |
The |
| 811 |
.BR u \~command |
| 812 |
is a |
| 813 |
.I groff |
| 814 |
extension and is output only for devices whose |
| 815 |
.I DESC |
| 816 |
file contains the |
| 817 |
.B tcommand |
| 818 |
directive; |
| 819 |
see |
| 820 |
.MR groff_font 5 . |
| 821 |
. |
| 822 |
. |
| 823 |
.TP |
| 824 |
.command V n |
| 825 |
Vertically move the drawing position to |
| 826 |
.IR n\~ basic |
| 827 |
units from the top edge of the page. |
| 828 |
. |
| 829 |
.IR n\~ cannot |
| 830 |
be negative. |
| 831 |
. |
| 832 |
. |
| 833 |
.TP |
| 834 |
.command v n |
| 835 |
Move the drawing position down |
| 836 |
.I n |
| 837 |
basic units. |
| 838 |
. |
| 839 |
AT&T |
| 840 |
.I troff \" AT&T |
| 841 |
allowed negative |
| 842 |
.I n; |
| 843 |
GNU |
| 844 |
.I troff \" GNU |
| 845 |
does not produce such values, |
| 846 |
but |
| 847 |
.IR groff 's |
| 848 |
output driver library handles them. |
| 849 |
. |
| 850 |
. |
| 851 |
.TP |
| 852 |
.command w |
| 853 |
Indicate an inter-word space. |
| 854 |
. |
| 855 |
No action is performed; |
| 856 |
the command is present to make the output more easily parsed. |
| 857 |
. |
| 858 |
Only inter-word spaces on an output line |
| 859 |
(be they breakable or not) |
| 860 |
are thus described; |
| 861 |
those resulting from horizontal motion escape sequences are not. |
| 862 |
. |
| 863 |
GNU |
| 864 |
.I troff \" GNU |
| 865 |
issues this command but |
| 866 |
.IR groff 's |
| 867 |
output driver library ignores it. |
| 868 |
. |
| 869 |
See |
| 870 |
.B h |
| 871 |
and |
| 872 |
.BR H . |
| 873 |
. |
| 874 |
. |
| 875 |
.\" ==================================================================== |
| 876 |
.SS "Graphics commands" |
| 877 |
.\" ==================================================================== |
| 878 |
. |
| 879 |
Each graphics or drawing command in the page description language |
| 880 |
starts with the letter |
| 881 |
.RB \[lq] D \[rq], |
| 882 |
followed by one or two characters that specify a subcommand; |
| 883 |
this is followed by a fixed or variable number of integer |
| 884 |
arguments that are separated by a single space character. |
| 885 |
. |
| 886 |
A |
| 887 |
.RB \[lq] D \[rq], |
| 888 |
command may not be followed by another command on the same line |
| 889 |
(apart from a comment), |
| 890 |
so each |
| 891 |
.RB \[lq] D \[rq] |
| 892 |
command is terminated by a syntactical line break. |
| 893 |
. |
| 894 |
. |
| 895 |
.P |
| 896 |
.\" XXX: Fact-check this. --GBR |
| 897 |
GNU |
| 898 |
.I troff \" GNU |
| 899 |
output follows AT&T |
| 900 |
.IR troff 's \" AT&T |
| 901 |
output conventions |
| 902 |
(no space between command and subcommand, |
| 903 |
all arguments are preceded by a single space character), |
| 904 |
but |
| 905 |
.IR groff 's |
| 906 |
parser allows optional space |
| 907 |
between the command letters |
| 908 |
and makes the space before the first argument optional. |
| 909 |
. |
| 910 |
As usual, |
| 911 |
each space can be any sequence of tab and space characters. |
| 912 |
. |
| 913 |
. |
| 914 |
.P |
| 915 |
Some graphics commands can take a variable number of arguments. |
| 916 |
. |
| 917 |
In this case, they are integers representing a size measured in basic |
| 918 |
units\~\c |
| 919 |
.BR u . |
| 920 |
. |
| 921 |
The |
| 922 |
.I h |
| 923 |
arguments |
| 924 |
stand for horizontal distances where positive means right, negative |
| 925 |
left. |
| 926 |
. |
| 927 |
The |
| 928 |
.I v |
| 929 |
arguments |
| 930 |
stand for vertical distances where positive means down, negative up. |
| 931 |
. |
| 932 |
All these distances are offsets relative to the current location. |
| 933 |
. |
| 934 |
. |
| 935 |
.P |
| 936 |
Each graphics command directly corresponds to a |
| 937 |
.I troff \" generic |
| 938 |
.B \[rs]D |
| 939 |
escape sequence. |
| 940 |
. |
| 941 |
See subsection \[lq]Drawing commands\[rq] of |
| 942 |
.MR groff 7 . |
| 943 |
. |
| 944 |
. |
| 945 |
.P |
| 946 |
Unless indicated otherwise, each graphics command directly corresponds |
| 947 |
to a similar |
| 948 |
.I groff |
| 949 |
.B \*[@backslash]D |
| 950 |
escape sequence; see |
| 951 |
.MR groff 7 . |
| 952 |
. |
| 953 |
. |
| 954 |
.P |
| 955 |
Unknown |
| 956 |
.BR D \~commands |
| 957 |
are assumed to be device-specific. |
| 958 |
. |
| 959 |
Its arguments are parsed as strings; the whole information is then |
| 960 |
sent to the postprocessor. |
| 961 |
. |
| 962 |
. |
| 963 |
.P |
| 964 |
In the following command reference, the syntax element |
| 965 |
.I \[la]line-break\[ra] |
| 966 |
means a |
| 967 |
.I syntactical line break |
| 968 |
as defined in subsection \[lq]Separation\[rq] above. |
| 969 |
. |
| 970 |
. |
| 971 |
.TP |
| 972 |
.D-multiarg \[ti] |
| 973 |
Draw B-spline from current position to offset |
| 974 |
.indexed_offset h 1 v 1 , |
| 975 |
then to offset |
| 976 |
.indexed_offset h 2 v 2 |
| 977 |
if given, etc., up to |
| 978 |
.indexed_offset h n v n . |
| 979 |
This command takes a variable number of argument pairs; the current |
| 980 |
position is moved to the terminal point of the drawn curve. |
| 981 |
. |
| 982 |
. |
| 983 |
.TP |
| 984 |
.Da-command |
| 985 |
Draw arc from current position to |
| 986 |
.indexed_offset h 1 v 1 \|+\| \c |
| 987 |
.indexed_offset h 2 v 2 |
| 988 |
with center at |
| 989 |
.indexed_offset h 1 v 1 ; |
| 990 |
then move the current position to the final point of the arc. |
| 991 |
. |
| 992 |
. |
| 993 |
.TP |
| 994 |
.D-command C d |
| 995 |
.TQ |
| 996 |
.D-command C "d dummy-arg" |
| 997 |
Draw a solid circle using the current fill color with diameter\~\c |
| 998 |
.I d |
| 999 |
(integer in basic units\~\c |
| 1000 |
.BR u ) |
| 1001 |
with leftmost point at the current position; then move the current |
| 1002 |
position to the rightmost point of the circle. |
| 1003 |
. |
| 1004 |
An optional second integer argument is ignored (this allows the |
| 1005 |
formatter to generate an even number of arguments). |
| 1006 |
. |
| 1007 |
This command is a GNU extension. |
| 1008 |
. |
| 1009 |
. |
| 1010 |
.TP |
| 1011 |
.D-command c d |
| 1012 |
Draw circle line with diameter\~\c |
| 1013 |
.I d |
| 1014 |
(integer in basic units\~\c |
| 1015 |
.BR u ) |
| 1016 |
with leftmost point at the current position; then move the current |
| 1017 |
position to the rightmost point of the circle. |
| 1018 |
. |
| 1019 |
. |
| 1020 |
.TP |
| 1021 |
.D-command E "h v" |
| 1022 |
Draw a solid ellipse in the current fill color with a horizontal |
| 1023 |
diameter of\~\c |
| 1024 |
.I h |
| 1025 |
and a vertical diameter of\~\c |
| 1026 |
.I v |
| 1027 |
(both integers in basic units\~\c |
| 1028 |
.BR u ) |
| 1029 |
with the leftmost point at the current position; then move to the |
| 1030 |
rightmost point of the ellipse. |
| 1031 |
. |
| 1032 |
This command is a GNU extension. |
| 1033 |
. |
| 1034 |
. |
| 1035 |
.br |
| 1036 |
.ne 4v |
| 1037 |
.TP |
| 1038 |
.D-command e "h v" |
| 1039 |
Draw an outlined ellipse with a horizontal diameter of\~\c |
| 1040 |
.I h |
| 1041 |
and a vertical diameter of\~\c |
| 1042 |
.I v |
| 1043 |
(both integers in basic units\~\c |
| 1044 |
.BR u ) |
| 1045 |
with the leftmost point at current position; then move to the |
| 1046 |
rightmost point of the ellipse. |
| 1047 |
. |
| 1048 |
. |
| 1049 |
.TP |
| 1050 |
.D-command F "color-scheme \fR[\fPcomponent\fR .\|.\|.]\fP" |
| 1051 |
Set fill color for solid drawing objects using different color |
| 1052 |
schemes; the analogous command for setting the color of text, line |
| 1053 |
graphics, and the outline of graphic objects is |
| 1054 |
.BR m . |
| 1055 |
. |
| 1056 |
The color components are specified as integer arguments between 0 and |
| 1057 |
\n[@maxcolor]. |
| 1058 |
. |
| 1059 |
The number of color components and their meaning vary for the |
| 1060 |
different color schemes. |
| 1061 |
. |
| 1062 |
These commands are generated by |
| 1063 |
GNU |
| 1064 |
.IR troff 's \" GNU |
| 1065 |
escape sequences |
| 1066 |
.RB \[lq] "\[rs]D\[aq]F\~" .\|.\|. \[aq] \[rq] |
| 1067 |
.B \[rs]M |
| 1068 |
(with no other corresponding graphics commands). |
| 1069 |
. |
| 1070 |
No position changing. |
| 1071 |
. |
| 1072 |
This command is a GNU extension. |
| 1073 |
. |
| 1074 |
. |
| 1075 |
.RS |
| 1076 |
. |
| 1077 |
.TP |
| 1078 |
.D-command Fc "cyan magenta yellow" |
| 1079 |
Set fill color for solid drawing objects using the CMY color scheme, |
| 1080 |
having the 3\~color components cyan, magenta, and yellow. |
| 1081 |
. |
| 1082 |
. |
| 1083 |
.TP |
| 1084 |
.D-command Fd |
| 1085 |
Set fill color for solid drawing objects to the default fill color value |
| 1086 |
(black in most cases). |
| 1087 |
. |
| 1088 |
No component arguments. |
| 1089 |
. |
| 1090 |
. |
| 1091 |
.TP |
| 1092 |
.D-command Fg "gray" |
| 1093 |
Set fill color for solid drawing objects to the shade of gray given by |
| 1094 |
the argument, an integer between 0 (black) and \n[@maxcolor] (white). |
| 1095 |
. |
| 1096 |
. |
| 1097 |
.TP |
| 1098 |
.D-command Fk "cyan magenta yellow black" |
| 1099 |
Set fill color for solid drawing objects using the CMYK color scheme, |
| 1100 |
having the 4\~color components cyan, magenta, yellow, and black. |
| 1101 |
. |
| 1102 |
.TP |
| 1103 |
.D-command Fr "red green blue" |
| 1104 |
Set fill color for solid drawing objects using the RGB color scheme, |
| 1105 |
having the 3\~color components red, green, and blue. |
| 1106 |
. |
| 1107 |
.RE |
| 1108 |
. |
| 1109 |
. |
| 1110 |
.TP |
| 1111 |
.D-command f n |
| 1112 |
The argument |
| 1113 |
.I n |
| 1114 |
must be an integer in the range \-32767 to 32767. |
| 1115 |
. |
| 1116 |
.RS |
| 1117 |
.TP |
| 1118 |
.RI 0\|\[<=]\| n \|\[<=]\|1000 |
| 1119 |
Set the color for filling solid drawing objects to a shade of gray, |
| 1120 |
where 0 corresponds to solid white, 1000 (the default) to solid black, |
| 1121 |
and values in between to intermediate shades of gray; |
| 1122 |
this command is |
| 1123 |
superseded by |
| 1124 |
.RB \[lq] DFg \[rq]. |
| 1125 |
. |
| 1126 |
.TP |
| 1127 |
.IR n "\|<\|0 or " n \|>\|1000 |
| 1128 |
Set the filling color to the color that is currently being used for |
| 1129 |
the text and the outline, see command |
| 1130 |
.BR m . |
| 1131 |
For example, the command sequence |
| 1132 |
. |
| 1133 |
.RS |
| 1134 |
.IP |
| 1135 |
.EX |
| 1136 |
mg 0 0 \n[@maxcolor] |
| 1137 |
Df \-1 |
| 1138 |
.EE |
| 1139 |
.RE |
| 1140 |
. |
| 1141 |
.IP |
| 1142 |
sets all colors to blue. |
| 1143 |
. |
| 1144 |
.P |
| 1145 |
This command is a GNU extension. |
| 1146 |
.RE |
| 1147 |
. |
| 1148 |
. |
| 1149 |
.TP |
| 1150 |
.D-command l "h v" |
| 1151 |
Draw line from current position to offset |
| 1152 |
.offset h v |
| 1153 |
(integers in basic units\~\c |
| 1154 |
.BR u ); |
| 1155 |
then set current position to the end of the drawn line. |
| 1156 |
. |
| 1157 |
. |
| 1158 |
.TP |
| 1159 |
.D-multiarg p |
| 1160 |
Draw a polygon line from current position to offset |
| 1161 |
.indexed_offset h 1 v 1 , |
| 1162 |
from there to offset |
| 1163 |
.indexed_offset h 2 v 2 , |
| 1164 |
etc., up to offset |
| 1165 |
.indexed_offset h n v n , |
| 1166 |
and from there back to the starting position. |
| 1167 |
. |
| 1168 |
.ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 1169 |
For historical reasons, the position is changed by adding the sum of |
| 1170 |
all arguments with odd index to the current horizontal position and the |
| 1171 |
even ones to the vertical position. |
| 1172 |
. |
| 1173 |
Although this doesn't make sense it is kept for compatibility. |
| 1174 |
. |
| 1175 |
.\} |
| 1176 |
.el \{\ |
| 1177 |
As the polygon is closed, the end of drawing is the starting point, so |
| 1178 |
the position doesn't change. |
| 1179 |
.\} |
| 1180 |
. |
| 1181 |
This command is a |
| 1182 |
.I groff |
| 1183 |
extension. |
| 1184 |
. |
| 1185 |
. |
| 1186 |
.TP |
| 1187 |
.D-multiarg P |
| 1188 |
The same macro as the corresponding |
| 1189 |
.B Dp |
| 1190 |
command with the same arguments, but draws a solid polygon in the |
| 1191 |
current fill color rather than an outlined polygon. |
| 1192 |
. |
| 1193 |
.if \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 1194 |
The position is changed in the same way as with |
| 1195 |
.BR Dp . |
| 1196 |
.\} |
| 1197 |
. |
| 1198 |
This command is a GNU extension. |
| 1199 |
. |
| 1200 |
. |
| 1201 |
.TP |
| 1202 |
.D-command t n |
| 1203 |
Set the current line thickness |
| 1204 |
.RI to\~ n |
| 1205 |
(an integer in basic |
| 1206 |
.RB units\~ u ) |
| 1207 |
if |
| 1208 |
.IR n \|>\|0; |
| 1209 |
if |
| 1210 |
.IR n \|=\|0 |
| 1211 |
select the smallest available line thickness; |
| 1212 |
otherwise, |
| 1213 |
the line thickness is made proportional to the type size, |
| 1214 |
which is the default. |
| 1215 |
. |
| 1216 |
.if \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 1217 |
For historical reasons, |
| 1218 |
the horizontal position is changed by adding the argument to the current |
| 1219 |
horizontal position, |
| 1220 |
while the vertical position is not changed. |
| 1221 |
. |
| 1222 |
Although this doesn't make sense, |
| 1223 |
it is kept for compatibility. |
| 1224 |
.\} |
| 1225 |
. |
| 1226 |
This command is a GNU extension. |
| 1227 |
. |
| 1228 |
. |
| 1229 |
.\" ==================================================================== |
| 1230 |
.SS "Device control commands" |
| 1231 |
.\" ==================================================================== |
| 1232 |
. |
| 1233 |
Each device control command starts with the letter |
| 1234 |
.RB \[lq] x \[rq], |
| 1235 |
followed by a space character |
| 1236 |
(optional or arbitrary space or tab in |
| 1237 |
GNU |
| 1238 |
.IR troff ) \" GNU |
| 1239 |
and a subcommand letter or word; |
| 1240 |
each argument |
| 1241 |
(if any) |
| 1242 |
must be preceded by a syntactical space. |
| 1243 |
All |
| 1244 |
.RB \[lq] x \[rq], |
| 1245 |
commands are terminated by a syntactical line break; |
| 1246 |
no device control command |
| 1247 |
can be followed by another command on the same line |
| 1248 |
(except a comment). |
| 1249 |
. |
| 1250 |
. |
| 1251 |
.P |
| 1252 |
The subcommand is basically a single letter, but to increase |
| 1253 |
readability, it can be written as a word, i.e., an arbitrary sequence |
| 1254 |
of characters terminated by the next tab, space, or newline character. |
| 1255 |
. |
| 1256 |
All characters of the subcommand word but the first are simply ignored. |
| 1257 |
. |
| 1258 |
For example, |
| 1259 |
GNU |
| 1260 |
.I troff \" GNU |
| 1261 |
outputs the initialization command |
| 1262 |
.RB \[lq] "x i" \[rq] |
| 1263 |
as |
| 1264 |
.RB \[lq] "x init" \[rq] |
| 1265 |
and the resolution command |
| 1266 |
.RB \[lq] "x r" \[rq] |
| 1267 |
as |
| 1268 |
.RB \[lq] "x res" \[rq]. |
| 1269 |
. |
| 1270 |
. |
| 1271 |
.P |
| 1272 |
In the following, the syntax element |
| 1273 |
.I \[la]line-break\[ra] |
| 1274 |
means a |
| 1275 |
.I syntactical line break |
| 1276 |
as defined in subsection \[lq]Separation\[rq] above. |
| 1277 |
. |
| 1278 |
.TP |
| 1279 |
.x-command F name |
| 1280 |
.xsub Filename |
| 1281 |
Use |
| 1282 |
.I name |
| 1283 |
as the intended name for the current file in error reports. |
| 1284 |
. |
| 1285 |
This is useful for remembering the original file name when |
| 1286 |
.I groff |
| 1287 |
uses its internal piping mechanism. |
| 1288 |
. |
| 1289 |
The input file is not changed by this command. |
| 1290 |
. |
| 1291 |
This command is a GNU extension. |
| 1292 |
. |
| 1293 |
. |
| 1294 |
.TP |
| 1295 |
.x-command f "n\ s" |
| 1296 |
.xsub font |
| 1297 |
Mount font position\~\c |
| 1298 |
.I n |
| 1299 |
(a non-negative integer) with font named\~\c |
| 1300 |
.I s |
| 1301 |
(a text word); |
| 1302 |
see |
| 1303 |
.MR groff_font 5 . |
| 1304 |
. |
| 1305 |
. |
| 1306 |
.TP |
| 1307 |
.x-command H n |
| 1308 |
.xsub Height |
| 1309 |
Set character height to\~\c |
| 1310 |
.I n |
| 1311 |
(a positive integer in scaled points\~\c |
| 1312 |
.BR z ). |
| 1313 |
. |
| 1314 |
.I Classical troff |
| 1315 |
used the unit points (\c |
| 1316 |
.BR p ) |
| 1317 |
instead; |
| 1318 |
see section \[lq]Compatibility\[rq] below. |
| 1319 |
. |
| 1320 |
. |
| 1321 |
.TP |
| 1322 |
.x-command i |
| 1323 |
.xsub init |
| 1324 |
Initialize device. |
| 1325 |
. |
| 1326 |
This is the third command of the header. |
| 1327 |
. |
| 1328 |
. |
| 1329 |
.TP |
| 1330 |
.x-command p |
| 1331 |
.xsub pause |
| 1332 |
Parsed but ignored. |
| 1333 |
. |
| 1334 |
The classical documentation reads |
| 1335 |
.I pause device, can be |
| 1336 |
.IR restarted . |
| 1337 |
. |
| 1338 |
. |
| 1339 |
.TP |
| 1340 |
.x-command r "n\ h\ v" |
| 1341 |
.xsub resolution |
| 1342 |
Resolution is\~\c |
| 1343 |
.IR n , |
| 1344 |
while |
| 1345 |
.I h |
| 1346 |
is the minimal horizontal motion, and |
| 1347 |
.I v |
| 1348 |
the minimal vertical motion possible with this device; all arguments |
| 1349 |
are positive integers in basic units\~\c |
| 1350 |
.B u |
| 1351 |
per inch. |
| 1352 |
. |
| 1353 |
This is the second command of the header. |
| 1354 |
. |
| 1355 |
. |
| 1356 |
.TP |
| 1357 |
.x-command S n |
| 1358 |
.xsub Slant |
| 1359 |
Set slant to\~\c |
| 1360 |
.I n |
| 1361 |
degrees (an integer in basic units\~\c |
| 1362 |
.BR u ). |
| 1363 |
. |
| 1364 |
. |
| 1365 |
.TP |
| 1366 |
.x-command s |
| 1367 |
.xsub stop |
| 1368 |
Terminates the processing of the current file; issued as the last |
| 1369 |
command of device-independent |
| 1370 |
.I troff \" generic |
| 1371 |
output. |
| 1372 |
. |
| 1373 |
. |
| 1374 |
.TP |
| 1375 |
.x-command t |
| 1376 |
.xsub trailer |
| 1377 |
Generate trailer information, if any. |
| 1378 |
. |
| 1379 |
In |
| 1380 |
.BR groff , |
| 1381 |
this is currently ignored. |
| 1382 |
. |
| 1383 |
. |
| 1384 |
.TP |
| 1385 |
.x-command T xxx |
| 1386 |
.xsub Typesetter |
| 1387 |
. |
| 1388 |
Set the name of the output driver to |
| 1389 |
.IR xxx , |
| 1390 |
a sequence of non-whitespace characters terminated by whitespace. |
| 1391 |
. |
| 1392 |
The possible names correspond to those of |
| 1393 |
.IR groff 's |
| 1394 |
.B \-T |
| 1395 |
option. |
| 1396 |
. |
| 1397 |
This is the first command of the header. |
| 1398 |
. |
| 1399 |
. |
| 1400 |
.TP |
| 1401 |
.x-command u n |
| 1402 |
.xsub underline |
| 1403 |
Configure underlining of spaces. |
| 1404 |
. |
| 1405 |
If |
| 1406 |
.I n |
| 1407 |
is\~1, start underlining of spaces; |
| 1408 |
if |
| 1409 |
.I n |
| 1410 |
is\~0, stop underlining of spaces. |
| 1411 |
. |
| 1412 |
This is needed for the |
| 1413 |
.B cu |
| 1414 |
request in |
| 1415 |
.B \%nroff |
| 1416 |
mode and is ignored otherwise. |
| 1417 |
. |
| 1418 |
This command is a GNU extension. |
| 1419 |
. |
| 1420 |
. |
| 1421 |
.TP |
| 1422 |
.x-command X anything |
| 1423 |
.xsub X-escape |
| 1424 |
Send string |
| 1425 |
.I anything |
| 1426 |
uninterpreted to the device. |
| 1427 |
. |
| 1428 |
If the line following this command starts with a |
| 1429 |
.B + |
| 1430 |
character this line is interpreted as a continuation line in the |
| 1431 |
following sense. |
| 1432 |
. |
| 1433 |
The |
| 1434 |
.B + |
| 1435 |
is ignored, but a newline character is sent instead to the device, the |
| 1436 |
rest of the line is sent uninterpreted. |
| 1437 |
. |
| 1438 |
The same applies to all following lines until the first character of a |
| 1439 |
line is not a |
| 1440 |
.B + |
| 1441 |
character. |
| 1442 |
. |
| 1443 |
This command is generated by the |
| 1444 |
.I groff |
| 1445 |
escape sequence |
| 1446 |
.BR \*[@backslash]X . |
| 1447 |
. |
| 1448 |
Line continuation is a GNU extension. |
| 1449 |
. |
| 1450 |
. |
| 1451 |
.\" ==================================================================== |
| 1452 |
.SS "Legacy compressed encoding" |
| 1453 |
.\" ==================================================================== |
| 1454 |
. |
| 1455 |
AT&T |
| 1456 |
.I troff \" AT&T |
| 1457 |
primarily emitted glyphs by writing two digits |
| 1458 |
(a motion) |
| 1459 |
followed by a single character corresponding to a glyph. |
| 1460 |
. |
| 1461 |
This syntax is less a command itself than a compressed encoding of the |
| 1462 |
.B c |
| 1463 |
and |
| 1464 |
.B h |
| 1465 |
commands. |
| 1466 |
. |
| 1467 |
. |
| 1468 |
.TP |
| 1469 |
.I ddc |
| 1470 |
Move right |
| 1471 |
.I dd |
| 1472 |
(exactly two decimal digits) basic units\~\c |
| 1473 |
.BR u , |
| 1474 |
then print glyph with single-letter name\~\c |
| 1475 |
.IR c . |
| 1476 |
. |
| 1477 |
. |
| 1478 |
.RS |
| 1479 |
.P |
| 1480 |
In |
| 1481 |
.IR groff , |
| 1482 |
arbitrary |
| 1483 |
.I syntactical space |
| 1484 |
around and within this command is allowed to be added. |
| 1485 |
. |
| 1486 |
Only when a preceding command on the same line ends with an argument |
| 1487 |
of variable length a separating space is obligatory. |
| 1488 |
. |
| 1489 |
In |
| 1490 |
.I classical |
| 1491 |
.IR troff , |
| 1492 |
large clusters of these and other commands were used, mostly without |
| 1493 |
spaces; this made such output almost unreadable. |
| 1494 |
. |
| 1495 |
.RE |
| 1496 |
. |
| 1497 |
. |
| 1498 |
.P |
| 1499 |
For modern high-resolution devices, |
| 1500 |
this command is impractical |
| 1501 |
because the widths of the glyphs have a greater magnitude |
| 1502 |
in basic units |
| 1503 |
than two decimal digits can represent. |
| 1504 |
. |
| 1505 |
In |
| 1506 |
.IR groff , |
| 1507 |
it is used only for output to the |
| 1508 |
.BR X75 , |
| 1509 |
.BR X75\-12 , |
| 1510 |
.BR X100 , |
| 1511 |
and |
| 1512 |
.B X100\-12 |
| 1513 |
devices. |
| 1514 |
. |
| 1515 |
For others, |
| 1516 |
the commands |
| 1517 |
.B t |
| 1518 |
.RB and\~ u |
| 1519 |
provide greater functionality and superior troubleshooting capacity. |
| 1520 |
. |
| 1521 |
. |
| 1522 |
.\" ==================================================================== |
| 1523 |
.SH Compatibility |
| 1524 |
.\" ==================================================================== |
| 1525 |
. |
| 1526 |
.\" BEGIN Keep parallel with subsection "Output Language Compatibility" |
| 1527 |
.\" in doc/groff.texi.in. |
| 1528 |
The page description language of AT&T |
| 1529 |
.I troff \" AT&T |
| 1530 |
was first documented in |
| 1531 |
\[lq]A Typesetter-independent TROFF\[rq], |
| 1532 |
by Brian Kernighan, |
| 1533 |
and by 1992 the AT&T |
| 1534 |
.I troff \" AT&T; system |
| 1535 |
manual was updated to incorporate a description of it. |
| 1536 |
. |
| 1537 |
. |
| 1538 |
.P |
| 1539 |
.IR groff 's |
| 1540 |
page description language is compatible with this specification |
| 1541 |
except in the following aspects. |
| 1542 |
. |
| 1543 |
. |
| 1544 |
.IP \[bu] 3n |
| 1545 |
AT&T device-independent |
| 1546 |
.IR troff 's \" AT&T |
| 1547 |
quasi-device independence is not yet implemented. |
| 1548 |
.\" XXX: Explain what that means. |
| 1549 |
. |
| 1550 |
. |
| 1551 |
.IP \[bu] |
| 1552 |
The printing hardware of the early 1980s differed from today's. |
| 1553 |
. |
| 1554 |
.IR groff 's |
| 1555 |
output device names also differ from those of AT&T |
| 1556 |
.I troff \" AT&T; system |
| 1557 |
. |
| 1558 |
For example, |
| 1559 |
the PostScript device in AT&T |
| 1560 |
.I troff, \" AT&T; system |
| 1561 |
.B post |
| 1562 |
(implemented by the driver command |
| 1563 |
.IR dpost ), |
| 1564 |
has a resolution of only 720 units per inch, |
| 1565 |
suitable for printers of decades past. |
| 1566 |
. |
| 1567 |
.IR groff 's |
| 1568 |
.B ps |
| 1569 |
device has a resolution of 72000 units per inch. |
| 1570 |
. |
| 1571 |
In principle, |
| 1572 |
by implementing a rescaling mechanism, |
| 1573 |
.I groff |
| 1574 |
could come to emulate AT&T's |
| 1575 |
.B post |
| 1576 |
device. |
| 1577 |
. |
| 1578 |
. |
| 1579 |
.IP \[bu] |
| 1580 |
While the B-spline command |
| 1581 |
.B D\[ti] |
| 1582 |
is reliably interpreted by |
| 1583 |
.IR groff 's |
| 1584 |
page description language parser, |
| 1585 |
some output drivers don't implement drawing routines for it. |
| 1586 |
. |
| 1587 |
. |
| 1588 |
.IP \[bu] |
| 1589 |
In |
| 1590 |
GNU |
| 1591 |
.I troff, \" GNU |
| 1592 |
the argument to the commands |
| 1593 |
.B s |
| 1594 |
and |
| 1595 |
.B x\~H |
| 1596 |
uses an implicit unit of scaled points |
| 1597 |
.B z |
| 1598 |
whereas AT&T |
| 1599 |
.I troff \" AT&T |
| 1600 |
uses spacing points |
| 1601 |
.BR p . |
| 1602 |
. |
| 1603 |
This isn't an incompatibility, |
| 1604 |
but a compatible extension, |
| 1605 |
for both units coincide for any device without a |
| 1606 |
.B \%sizescale |
| 1607 |
directive in its |
| 1608 |
.I DESC |
| 1609 |
file, |
| 1610 |
including all postprocessors from AT&T and |
| 1611 |
.IR groff 's |
| 1612 |
text |
| 1613 |
.RI ( nroff -mode) |
| 1614 |
devices. |
| 1615 |
. |
| 1616 |
.I groff |
| 1617 |
devices that use |
| 1618 |
.B \%sizescale |
| 1619 |
either do not exist for AT&T |
| 1620 |
.I troff \" AT&T; system |
| 1621 |
have a different name, |
| 1622 |
or seem to have a different resolution. |
| 1623 |
. |
| 1624 |
So conflicts are very unlikely. |
| 1625 |
. |
| 1626 |
. |
| 1627 |
.ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 1628 |
.IP \[bu] |
| 1629 |
The drawing position after the commands |
| 1630 |
.RB \[lq] Dp \[rq], |
| 1631 |
.RB \[lq] DP \[rq], |
| 1632 |
and |
| 1633 |
.RB \[lq] Dt \[rq], |
| 1634 |
are processed is illogical. |
| 1635 |
. |
| 1636 |
Since old versions of |
| 1637 |
GNU |
| 1638 |
.I troff \" GNU |
| 1639 |
had this wart, |
| 1640 |
we've retained it for compatibility, |
| 1641 |
but may change it in the future. |
| 1642 |
. |
| 1643 |
Wrap these drawing commands with the |
| 1644 |
.B \[rs]Z |
| 1645 |
escape sequence to both overcome the illogical positioning |
| 1646 |
and keep your input working consistently |
| 1647 |
regardless of the wart's presence in the implementation. |
| 1648 |
.\} \" @STUPID_DRAWING_POSITIONING |
| 1649 |
.el \{\ |
| 1650 |
.IP \[bu] |
| 1651 |
Temporarily, there existed some confusion on the positioning after the |
| 1652 |
.B D |
| 1653 |
commands that are |
| 1654 |
.I groff |
| 1655 |
extensions. |
| 1656 |
. |
| 1657 |
This has been clarified by establishing the classical rule for all |
| 1658 |
groff drawing commands: |
| 1659 |
. |
| 1660 |
. |
| 1661 |
.RS |
| 1662 |
.P |
| 1663 |
.ft I |
| 1664 |
The position after a graphic object has been drawn is at its end; |
| 1665 |
for circles and ellipses, the "end" is at the right side. |
| 1666 |
.ft |
| 1667 |
.RE |
| 1668 |
. |
| 1669 |
. |
| 1670 |
.P |
| 1671 |
From this, the positionings specified for the drawing commands above |
| 1672 |
follow quite naturally. |
| 1673 |
.\} \" @STUPID_DRAWING_POSITIONING |
| 1674 |
. |
| 1675 |
.P |
| 1676 |
The differences between |
| 1677 |
.I groff |
| 1678 |
and |
| 1679 |
.I classical troff |
| 1680 |
are documented in |
| 1681 |
.MR groff_diff 7 . |
| 1682 |
.\" END Keep parallel with subsection "Output Language Compatibility" in |
| 1683 |
.\" doc/groff.texi.in. |
| 1684 |
. |
| 1685 |
. |
| 1686 |
.\" ==================================================================== |
| 1687 |
.SH Files |
| 1688 |
.\" ==================================================================== |
| 1689 |
. |
| 1690 |
.TP |
| 1691 |
.IR /usr/\:\%share/\:\%groff/\:\%1.24.1/\:\%font/\:\%dev name /\:DESC |
| 1692 |
describes the output device |
| 1693 |
.IR name . |
| 1694 |
. |
| 1695 |
. |
| 1696 |
.br |
| 1697 |
.ne 4v |
| 1698 |
.\" ==================================================================== |
| 1699 |
.SH Authors |
| 1700 |
.\" ==================================================================== |
| 1701 |
. |
| 1702 |
James Clark wrote an early version of this document, |
| 1703 |
which described only the differences between AT&T |
| 1704 |
device-independent |
| 1705 |
.IR troff 's \" AT&T |
| 1706 |
page description language and that of GNU |
| 1707 |
.IR troff . \" GNU |
| 1708 |
. |
| 1709 |
It has since been expanded and revised by |
| 1710 |
.MT groff\-bernd\:.warken\-72@\:web\:.de |
| 1711 |
Bernd Warken |
| 1712 |
.ME |
| 1713 |
and |
| 1714 |
.MT g.branden\:.robinson@\:gmail\:.com |
| 1715 |
G. Branden Robinson |
| 1716 |
.ME . |
| 1717 |
. |
| 1718 |
. |
| 1719 |
.\" ==================================================================== |
| 1720 |
.SH "See also" |
| 1721 |
.\" ==================================================================== |
| 1722 |
. |
| 1723 |
.P |
| 1724 |
.IR "Groff: The GNU Implementation of troff" , |
| 1725 |
by Trent A.\& Fisher and Werner Lemberg, |
| 1726 |
is the primary |
| 1727 |
.I groff |
| 1728 |
manual. |
| 1729 |
. |
| 1730 |
You can browse it interactively with \[lq]info groff\[rq]. |
| 1731 |
. |
| 1732 |
. |
| 1733 |
.br |
| 1734 |
.ne 4v |
| 1735 |
.P |
| 1736 |
\[lq]Troff User's Manual\[rq] |
| 1737 |
by Joseph F.\& Ossanna, |
| 1738 |
1976 |
| 1739 |
(revised by Brian W.\& Kernighan, |
| 1740 |
1992), |
| 1741 |
AT&T Bell Laboratories Computing Science Technical Report No.\& 54, |
| 1742 |
widely called simply \[lq]CSTR\~#54\[rq], |
| 1743 |
documents the language, |
| 1744 |
device and font description file formats, |
| 1745 |
and device-independent page description language |
| 1746 |
referred to collectively in |
| 1747 |
.I groff |
| 1748 |
documentation as |
| 1749 |
.RI \[lq]AT&T\~ troff \[rq]. |
| 1750 |
. |
| 1751 |
. |
| 1752 |
.P |
| 1753 |
\[lq]A Typesetter-independent TROFF\[rq] |
| 1754 |
by Brian W.\& Kernighan, |
| 1755 |
1982, |
| 1756 |
AT&T Bell Laboratories Computing Science Technical Report No.\& 97, |
| 1757 |
(CSTR\~#97), |
| 1758 |
provides additional insights into the |
| 1759 |
device and font description file formats |
| 1760 |
and device-independent page description language. |
| 1761 |
. |
| 1762 |
. |
| 1763 |
.TP |
| 1764 |
.MR groff 1 |
| 1765 |
documents the |
| 1766 |
.B \-Z |
| 1767 |
option and contains pointers to further |
| 1768 |
.I groff |
| 1769 |
documentation. |
| 1770 |
. |
| 1771 |
. |
| 1772 |
.TP |
| 1773 |
.MR groff 7 |
| 1774 |
describes the |
| 1775 |
.I groff |
| 1776 |
language, |
| 1777 |
including its escape sequences and system of units. |
| 1778 |
. |
| 1779 |
. |
| 1780 |
.TP |
| 1781 |
.MR groff_font 5 |
| 1782 |
details the scaling parameters of |
| 1783 |
.I DESC |
| 1784 |
(device description) |
| 1785 |
files. |
| 1786 |
. |
| 1787 |
. |
| 1788 |
.TP |
| 1789 |
.MR \%troff 1 |
| 1790 |
generates the language documented here. |
| 1791 |
. |
| 1792 |
. |
| 1793 |
.TP |
| 1794 |
.MR roff 7 |
| 1795 |
presents historical aspects and the general structure of |
| 1796 |
.I roff |
| 1797 |
systems. |
| 1798 |
. |
| 1799 |
. |
| 1800 |
.TP |
| 1801 |
.MR groff_diff 7 |
| 1802 |
enumerates differences between the output of AT&T |
| 1803 |
.I troff \" AT&T |
| 1804 |
and that of GNU |
| 1805 |
.IR troff . \" GNU |
| 1806 |
. |
| 1807 |
. |
| 1808 |
.TP |
| 1809 |
.MR gxditview 1 |
| 1810 |
is a viewer for device-independent |
| 1811 |
.I troff \" generic |
| 1812 |
output. |
| 1813 |
. |
| 1814 |
. |
| 1815 |
.TP |
| 1816 |
.UR https://\:github.com/\:Alhadis/\:Roff\:.js/ |
| 1817 |
.I Roff.js |
| 1818 |
.UE |
| 1819 |
is a viewer for device-independent |
| 1820 |
.I troff \" generic |
| 1821 |
output written in JavaScript. |
| 1822 |
. |
| 1823 |
. |
| 1824 |
.P |
| 1825 |
.MR grodvi 1 , |
| 1826 |
.MR grohtml 1 , |
| 1827 |
.MR grolbp 1 , |
| 1828 |
.MR grolj4 1 , |
| 1829 |
.MR gropdf 1 , |
| 1830 |
.MR grops 1 , |
| 1831 |
and |
| 1832 |
.MR grotty 1 |
| 1833 |
are |
| 1834 |
.I groff |
| 1835 |
postprocessors. |
| 1836 |
. |
| 1837 |
. |
| 1838 |
.\" Restore compatibility mode (for, e.g., Solaris 10/11). |
| 1839 |
.cp \n[*groff_groff_out_5_man_C] |
| 1840 |
.do rr *groff_groff_out_5_man_C |
| 1841 |
. |
| 1842 |
. |
| 1843 |
.\" Local Variables: |
| 1844 |
.\" fill-column: 72 |
| 1845 |
.\" mode: nroff |
| 1846 |
.\" End: |
| 1847 |
.\" vim: set filetype=groff textwidth=72: |