| Commit | Line | Data |
|---|---|---|
| 92d0a6a6 JR |
1 | '\" e |
| 2 | .\" The above line should force the use of eqn as a preprocessor | |
| 3 | .ig | |
| 4 | groff_out.5 | |
| 5 | ||
| 92d0a6a6 JR |
6 | This file is part of groff, the GNU roff type-setting system. |
| 7 | ||
| 4d3e9548 JL |
8 | Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
| 9 | 2009 | |
| 465b256c | 10 | Free Software Foundation, Inc. |
| 92d0a6a6 JR |
11 | rewritten from scrach 2001 by Bernd Warken <bwarken@mayn.de> |
| 12 | ||
| 13 | Permission is granted to copy, distribute and/or modify this document | |
| 4d3e9548 | 14 | under the terms of the GNU Free Documentation License, Version 1.3 or |
| 92d0a6a6 JR |
15 | any later version published by the Free Software Foundation; with the |
| 16 | Invariant Sections being this .ig-section and AUTHORS, with no | |
| 17 | Front-Cover Texts, and with no Back-Cover Texts. | |
| 18 | ||
| 19 | A copy of the Free Documentation License is included as a file called | |
| 20 | FDL in the main directory of the groff source package. | |
| 21 | .. | |
| 22 | . | |
| 23 | .\" -------------------------------------------------------------------- | |
| 24 | .\" Setup | |
| 25 | .\" -------------------------------------------------------------------- | |
| 26 | . | |
| 92d0a6a6 JR |
27 | .\" ----------------- Document configuration |
| 28 | . | |
| 29 | .\" Number register to decide whether the commands `{' and `}' are used | |
| 30 | .\" 0: disable (actual default); 1: enable | |
| 31 | .nr @USE_ENV_STACK 0 | |
| 32 | . | |
| 33 | .ig | |
| 34 | Unfortunately, old versions of groff used an illogical position change | |
| 35 | after some D\~commands (Dp, DP, Dt). If the number register | |
| 36 | @STUPID_DRAWING_POSITIONING is 1 (actual default) then change position | |
| 37 | after these commands, otherwise the position is not changed. | |
| 38 | .. | |
| 39 | .nr @STUPID_DRAWING_POSITIONING 1 | |
| 40 | . | |
| 4d3e9548 | 41 | .\" ----------------- Semantical definitions |
| 92d0a6a6 JR |
42 | . |
| 43 | .nr @maxcolor 65536 | |
| 44 | .ds @backslash \[rs]\" | |
| 4d3e9548 | 45 | .ds @linebreak \fR\[la]line-break\[ra]\fP\" |
| 92d0a6a6 JR |
46 | . |
| 47 | .\" Begin of macro definitions | |
| 92d0a6a6 | 48 | . |
| 92d0a6a6 | 49 | .de offset |
| 4d3e9548 | 50 | .RI ( \,\\$1\/ ,\ \,\\$2\/ )\\$3 |
| 92d0a6a6 JR |
51 | .. |
| 52 | .de indexed_offset | |
| 4d3e9548 | 53 | .offset \fI\\$1\fP\d\s-3\\$2\s+3\u \fI\\$3\fP\d\s-3\\$4\s+3\u \\$5 |
| 92d0a6a6 | 54 | .. |
| 4d3e9548 | 55 | .\" format: .command <name> "<arguments>" <punctuation> |
| 92d0a6a6 | 56 | .de command |
| 4d3e9548 | 57 | \fB\\$1\fP\ \fI\,\\$2\/\fP\\$3 |
| 92d0a6a6 | 58 | .. |
| 4d3e9548 | 59 | .\" format: .D-command <subcommand> "<arguments>" |
| 92d0a6a6 | 60 | .de D-command |
| 4d3e9548 | 61 | \fBD\\$1\fP\ \fI\,\\$2\/\fP\|\*[@linebreak] |
| 92d0a6a6 | 62 | .. |
| 4d3e9548 JL |
63 | . |
| 64 | .\" We set these as troff micromotions rather than eqn because \d and \u | |
| 65 | .\" can be lifted to XML subscript/superscript tags. Don't change | |
| 66 | .\" these to a parameterized string, man2html won't handle that. | |
| 67 | .ds hv1 \fIh\d\s-3\&1\s+3\u\~v\d\s-3\&1\s+3\u\fP | |
| 68 | .ds hv2 \fIh\d\s-3\&2\s+3\u\~v\d\s-3\&2\s+3\u\fP | |
| 69 | .ds hvn \fIh\d\s-3\&n\s+3\u\~v\d\s-3\&n\s+3\u\fP | |
| 70 | . | |
| 92d0a6a6 | 71 | .de Da-command |
| 4d3e9548 | 72 | \fBDa\fP\ \*[hv1] \*[hv2]\|\*[@linebreak] |
| 92d0a6a6 | 73 | .. |
| 4d3e9548 JL |
74 | .\" graphics command .D with a variable number of arguments |
| 75 | .\" format: .D-multiarg <subcommand> | |
| 92d0a6a6 | 76 | .de D-multiarg |
| 4d3e9548 | 77 | \fBD\\$1\fP\ \*[hv1] \*[hv2] .\|.\|. \*[hvn]\|\*[@linebreak] |
| 92d0a6a6 | 78 | .. |
| 4d3e9548 | 79 | .\" format: .x-command <subname> "<arguments>" |
| 92d0a6a6 | 80 | .de x-command |
| 4d3e9548 | 81 | \fBx\\$1\fP\ \fI\\$2\fP\|\*[@linebreak] |
| 92d0a6a6 JR |
82 | .. |
| 83 | .de xsub | |
| 4d3e9548 JL |
84 | .RI "(" "\\$1" " control command)" |
| 85 | .br | |
| 92d0a6a6 | 86 | .. |
| 92d0a6a6 JR |
87 | .\" End of macro definitions |
| 88 | . | |
| 89 | . | |
| 90 | .\" -------------------------------------------------------------------- | |
| 91 | .\" Title | |
| 92 | .\" -------------------------------------------------------------------- | |
| 93 | . | |
| 94 | .TH GROFF_OUT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" | |
| 95 | . | |
| 96 | .SH NAME | |
| 97 | groff_out \- groff intermediate output format | |
| 98 | . | |
| 99 | . | |
| 100 | .\" -------------------------------------------------------------------- | |
| 101 | .SH DESCRIPTION | |
| 102 | .\" -------------------------------------------------------------------- | |
| 103 | . | |
| 465b256c JR |
104 | This manual page describes the |
| 105 | .I intermediate output | |
| 106 | format of the GNU | |
| 92d0a6a6 | 107 | .BR roff (@MAN7EXT@) |
| 465b256c JR |
108 | text processing system |
| 109 | .BR groff (@MAN1EXT@). | |
| 92d0a6a6 JR |
110 | . |
| 111 | This output is produced by a run of the GNU | |
| 465b256c JR |
112 | .BR @g@troff (@MAN1EXT@) |
| 113 | program. | |
| 114 | . | |
| 115 | It contains already all device-specific information, but it is not yet | |
| 116 | fed into a device postprocessor program. | |
| 117 | . | |
| 92d0a6a6 JR |
118 | . |
| 119 | .P | |
| 465b256c JR |
120 | As the GNU |
| 121 | .I roff | |
| 122 | processor | |
| 92d0a6a6 | 123 | .BR groff (@MAN1EXT@) |
| 465b256c JR |
124 | is a wrapper program around |
| 125 | .B @g@troff | |
| 126 | that automatically calls a | |
| 92d0a6a6 JR |
127 | postprocessor, this output does not show up normally. |
| 128 | . | |
| 129 | This is why it is called | |
| 130 | .I intermediate | |
| 131 | within the | |
| 132 | .I groff | |
| 133 | .IR system . | |
| 134 | . | |
| 135 | The | |
| 136 | .B groff | |
| 137 | program provides the option | |
| 138 | .B -Z | |
| 465b256c JR |
139 | to inhibit postprocessing, such that the produced |
| 140 | .I intermediate output | |
| 92d0a6a6 | 141 | is sent to standard output just like calling |
| 465b256c | 142 | .B @g@troff |
| 92d0a6a6 JR |
143 | manually. |
| 144 | . | |
| 465b256c | 145 | . |
| 92d0a6a6 JR |
146 | .P |
| 147 | In this document, the term | |
| 465b256c JR |
148 | .I @g@troff output |
| 149 | describes what is output by the GNU | |
| 150 | .B @g@troff | |
| 151 | program, while | |
| 92d0a6a6 JR |
152 | .I intermediate output |
| 153 | refers to the language that is accepted by the parser that prepares | |
| 154 | this output for the postprocessors. | |
| 155 | . | |
| 156 | This parser is smarter on whitespace and implements obsolete elements | |
| 157 | for compatibility, otherwise both formats are the same. | |
| 158 | . | |
| 465b256c JR |
159 | Both formats can be viewed directly with |
| 160 | .BR \%gxditview (@MAN1EXT@). | |
| 161 | . | |
| 92d0a6a6 JR |
162 | . |
| 163 | .P | |
| 465b256c JR |
164 | The main purpose of the |
| 165 | .I intermediate output | |
| 166 | concept is to facilitate the development of postprocessors by | |
| 167 | providing a common programming interface for all devices. | |
| 92d0a6a6 JR |
168 | . |
| 169 | It has a language of its own that is completely different from the | |
| 170 | .BR groff (@MAN7EXT@) | |
| 171 | language. | |
| 172 | . | |
| 173 | While the | |
| 174 | .I groff | |
| 175 | language is a high-level programming language for text processing, the | |
| 465b256c JR |
176 | .I intermediate output |
| 177 | language is a kind of low-level assembler language by specifying all | |
| 178 | positions on the page for writing and drawing. | |
| 179 | . | |
| 92d0a6a6 JR |
180 | . |
| 181 | .P | |
| 465b256c JR |
182 | The |
| 183 | .RI pre- groff | |
| 184 | .I roff | |
| 185 | versions are denoted as | |
| 186 | .I classical | |
| 187 | .IR troff . | |
| 188 | The | |
| 189 | .I intermediate output | |
| 190 | produced by | |
| 191 | .B groff | |
| 92d0a6a6 JR |
192 | is fairly readable, while |
| 193 | .I classical troff | |
| 194 | output was hard to understand because of strange habits that are | |
| 195 | still supported, but not used any longer by | |
| 196 | .I GNU | |
| 465b256c | 197 | .IR @g@troff . |
| 92d0a6a6 JR |
198 | . |
| 199 | . | |
| 200 | .\" -------------------------------------------------------------------- | |
| 201 | .SH "LANGUAGE CONCEPTS" | |
| 202 | .\" -------------------------------------------------------------------- | |
| 203 | . | |
| 204 | During the run of | |
| 465b256c JR |
205 | .BR @g@troff , |
| 206 | the | |
| 207 | .I roff | |
| 208 | input is cracked down to the information on what has to be printed at | |
| 209 | what position on the intended device. | |
| 92d0a6a6 | 210 | . |
| 465b256c JR |
211 | So the language of the |
| 212 | .I intermediate output | |
| 213 | format can be quite small. | |
| 92d0a6a6 JR |
214 | . |
| 215 | Its only elements are commands with or without arguments. | |
| 216 | . | |
| 4d3e9548 | 217 | In this document, the term \[lq]command\[rq] always refers to the |
| 465b256c JR |
218 | .I intermediate output |
| 219 | language, never to the | |
| 220 | .I roff | |
| 221 | language used for document formatting. | |
| 92d0a6a6 JR |
222 | . |
| 223 | There are commands for positioning and text writing, for drawing, and | |
| 224 | for device controlling. | |
| 225 | . | |
| 226 | . | |
| 227 | .\" -------------------------------------------------------------------- | |
| 228 | .SS "Separation" | |
| 229 | .\" -------------------------------------------------------------------- | |
| 230 | . | |
| 231 | .I Classical troff output | |
| 232 | had strange requirements on whitespace. | |
| 233 | . | |
| 234 | The | |
| 465b256c | 235 | .B groff |
| 92d0a6a6 JR |
236 | output parser, however, is smart about whitespace by making it |
| 237 | maximally optional. | |
| 238 | . | |
| 465b256c | 239 | The whitespace characters, i.e., the |
| 92d0a6a6 JR |
240 | .IR tab , |
| 241 | .IR space , | |
| 242 | and | |
| 243 | .I newline | |
| 244 | characters, always have a syntactical meaning. | |
| 245 | . | |
| 246 | They are never printable because spacing within the output is always | |
| 247 | done by positioning commands. | |
| 248 | . | |
| 465b256c | 249 | . |
| 92d0a6a6 JR |
250 | .P |
| 251 | Any sequence of | |
| 252 | .I space | |
| 253 | or | |
| 254 | .I tab | |
| 255 | characters is treated as a single | |
| 465b256c JR |
256 | .I syntactical |
| 257 | .IR space . | |
| 92d0a6a6 JR |
258 | . |
| 259 | It separates commands and arguments, but is only required when there | |
| 260 | would occur a clashing between the command code and the arguments | |
| 261 | without the space. | |
| 262 | . | |
| 263 | Most often, this happens when variable length command names, | |
| 264 | arguments, argument lists, or command clusters meet. | |
| 265 | . | |
| 266 | Commands and arguments with a known, fixed length need not be | |
| 465b256c JR |
267 | separated by |
| 268 | .I syntactical | |
| 269 | .IR space . | |
| 270 | . | |
| 92d0a6a6 JR |
271 | . |
| 272 | .P | |
| 273 | A line break is a syntactical element, too. | |
| 274 | . | |
| 275 | Every command argument can be followed by whitespace, a comment, or a | |
| 276 | newline character. | |
| 277 | . | |
| 278 | Thus a | |
| 465b256c JR |
279 | .I syntactical line break |
| 280 | is defined to consist of optional | |
| 281 | .I syntactical space | |
| 282 | that is optionally followed by a comment, and a newline character. | |
| 283 | . | |
| 92d0a6a6 JR |
284 | . |
| 285 | .P | |
| 286 | The normal commands, those for positioning and text, consist of a | |
| 287 | single letter taking a fixed number of arguments. | |
| 288 | . | |
| 289 | For historical reasons, the parser allows to stack such commands on | |
| 465b256c JR |
290 | the same line, but fortunately, in |
| 291 | .I groff intermediate | |
| 292 | .IR output , | |
| 293 | every command with at least one argument is followed by a line break, | |
| 294 | thus providing excellent readability. | |
| 92d0a6a6 JR |
295 | . |
| 296 | .P | |
| 297 | The other commands \[em] those for drawing and device controlling \[em] | |
| 298 | have a more complicated structure; some recognize long command names, | |
| 299 | and some take a variable number of arguments. | |
| 300 | . | |
| 301 | So all | |
| 302 | .B D | |
| 303 | and | |
| 304 | .B x | |
| 305 | commands were designed to request a | |
| 306 | .I syntactical line break | |
| 307 | after their last argument. | |
| 308 | . | |
| 309 | Only one command, | |
| 310 | .RB ` x\ X ' | |
| 311 | has an argument that can stretch over several lines, all other | |
| 312 | commands must have all of their arguments on the same line as the | |
| 4d3e9548 | 313 | command, i.e., the arguments may not be split by a line break. |
| 92d0a6a6 JR |
314 | . |
| 315 | .P | |
| 465b256c | 316 | Empty lines, i.e., lines containing only space and/or a comment, can |
| 92d0a6a6 JR |
317 | occur everywhere. |
| 318 | . | |
| 319 | They are just ignored. | |
| 320 | . | |
| 321 | . | |
| 322 | .\" -------------------------------------------------------------------- | |
| 323 | .SS "Argument Units" | |
| 324 | .\" -------------------------------------------------------------------- | |
| 325 | . | |
| 326 | Some commands take integer arguments that are assumed to represent | |
| 327 | values in a measurement unit, but the letter for the corresponding | |
| 328 | .I scale indicator | |
| 329 | is not written with the output command arguments; see | |
| 330 | .BR groff (@MAN7EXT@) | |
| 465b256c JR |
331 | and the |
| 332 | .I groff info file | |
| 333 | for more on this topic. | |
| 92d0a6a6 JR |
334 | . |
| 335 | Most commands assume the scale indicator\~\c | |
| 4d3e9548 | 336 | .BR u , |
| 92d0a6a6 | 337 | the basic unit of the device, some use\~\c |
| 4d3e9548 | 338 | .BR z , |
| 92d0a6a6 JR |
339 | the |
| 340 | .I scaled point unit | |
| 341 | of the device, while others, such as the color commands expect plain | |
| 342 | integers. | |
| 343 | . | |
| 344 | Note that these scale indicators are relative to the chosen device. | |
| 345 | . | |
| 346 | They are defined by the parameters specified in the device's | |
| 347 | .I DESC | |
| 348 | file; see | |
| 349 | .BR groff_font (@MAN5EXT@). | |
| 350 | . | |
| 465b256c | 351 | . |
| 92d0a6a6 JR |
352 | .P |
| 353 | Note that single characters can have the eighth bit set, as can the | |
| 4d3e9548 | 354 | names of fonts and special characters (this is, glyphs). |
| 92d0a6a6 | 355 | . |
| 4d3e9548 | 356 | The names of glyphs and fonts can be of arbitrary length. |
| 92d0a6a6 | 357 | . |
| 4d3e9548 | 358 | A glyph that is to be printed will always be in the current font. |
| 92d0a6a6 | 359 | . |
| 465b256c | 360 | . |
| 92d0a6a6 JR |
361 | .P |
| 362 | A string argument is always terminated by the next whitespace | |
| 363 | character (space, tab, or newline); an embedded | |
| 364 | .B # | |
| 365 | character is regarded as part of the argument, not as the beginning of | |
| 366 | a comment command. | |
| 367 | . | |
| 368 | An integer argument is already terminated by the next non-digit | |
| 369 | character, which then is regarded as the first character of the next | |
| 370 | argument or command. | |
| 371 | . | |
| 372 | . | |
| 373 | .\" -------------------------------------------------------------------- | |
| 374 | .SS "Document Parts" | |
| 375 | .\" -------------------------------------------------------------------- | |
| 465b256c JR |
376 | A correct |
| 377 | .I intermediate output | |
| 378 | document consists of two parts, the | |
| 379 | .I prologue | |
| 380 | and the | |
| 381 | .IR body . | |
| 92d0a6a6 JR |
382 | . |
| 383 | .P | |
| 384 | The task of the | |
| 385 | .I prologue | |
| 386 | is to set the general device parameters using three exactly specified | |
| 387 | commands. | |
| 388 | . | |
| 389 | The | |
| 390 | .I groff prologue | |
| 391 | is guaranteed to consist of the following three lines (in that order): | |
| 392 | .RS | |
| 393 | .P | |
| 394 | .B x\ T | |
| 395 | .I device | |
| 396 | .br | |
| 397 | .B x\ res | |
| 398 | .I n\ h\ v | |
| 399 | .br | |
| 400 | .B x init | |
| 401 | .RE | |
| 402 | .P | |
| 403 | with the arguments set as outlined in the section | |
| 404 | .BR "Device Control Commands" . | |
| 405 | . | |
| 4d3e9548 | 406 | However, the parser for the |
| 465b256c JR |
407 | .I intermediate output |
| 408 | format is able to swallow additional whitespace and comments as well. | |
| 409 | . | |
| 92d0a6a6 JR |
410 | . |
| 411 | .P | |
| 412 | The | |
| 413 | .I body | |
| 414 | is the main section for processing the document data. | |
| 415 | . | |
| 416 | Syntactically, it is a sequence of any commands different from the | |
| 465b256c JR |
417 | ones used in the |
| 418 | .IR prologue . | |
| 92d0a6a6 JR |
419 | . |
| 420 | Processing is terminated as soon as the first | |
| 421 | .B x\ stop | |
| 465b256c JR |
422 | command is encountered; the last line of any |
| 423 | .I groff intermediate output | |
| 92d0a6a6 JR |
424 | always contains such a command. |
| 425 | . | |
| 465b256c | 426 | . |
| 92d0a6a6 | 427 | .P |
| 465b256c JR |
428 | Semantically, the |
| 429 | .I body | |
| 430 | is page oriented. | |
| 92d0a6a6 JR |
431 | . |
| 432 | A new page is started by a | |
| 433 | .BR p \~command. | |
| 434 | . | |
| 435 | Positioning, writing, and drawing commands are always done within the | |
| 436 | current page, so they cannot occur before the first | |
| 437 | .BR p \~command. | |
| 438 | . | |
| 439 | Absolute positioning (by the | |
| 440 | .B H | |
| 441 | and | |
| 442 | .BR V \~commands) | |
| 443 | is done relative to the current page, all other positioning | |
| 444 | is done relative to the current location within this page. | |
| 445 | . | |
| 446 | . | |
| 447 | .\" -------------------------------------------------------------------- | |
| 448 | .SH "COMMAND REFERENCE" | |
| 449 | .\" -------------------------------------------------------------------- | |
| 450 | . | |
| 465b256c JR |
451 | This section describes all |
| 452 | .I intermediate output | |
| 453 | commands, the classical commands as well as the | |
| 92d0a6a6 JR |
454 | .I groff |
| 455 | extensions. | |
| 456 | . | |
| 457 | . | |
| 458 | .\" -------------------------------------------------------------------- | |
| 459 | .SS "Comment Command" | |
| 460 | .\" -------------------------------------------------------------------- | |
| 461 | . | |
| 462 | .TP | |
| 4d3e9548 | 463 | .BI # anything \[la]end-of-line\[ra] |
| 92d0a6a6 JR |
464 | A comment. |
| 465 | . | |
| 466 | Ignore any characters from the | |
| 467 | .BR # \~\c | |
| 468 | character up to the next newline character. | |
| 469 | . | |
| 470 | .P | |
| 465b256c JR |
471 | This command is the only possibility for commenting in the |
| 472 | .I intermediate | |
| 473 | .IR output . | |
| 92d0a6a6 JR |
474 | . |
| 475 | Each comment can be preceded by arbitrary | |
| 476 | .I syntactical | |
| 477 | .IR space ; | |
| 478 | every command can be terminated by a comment. | |
| 479 | . | |
| 480 | . | |
| 481 | .\" -------------------------------------------------------------------- | |
| 482 | .SS "Simple Commands" | |
| 483 | .\" -------------------------------------------------------------------- | |
| 484 | . | |
| 485 | The commands in this subsection have a command code consisting of a | |
| 486 | single character, taking a fixed number of arguments. | |
| 487 | . | |
| 488 | Most of them are commands for positioning and text writing. | |
| 489 | . | |
| 490 | These commands are smart about whitespace. | |
| 491 | . | |
| 492 | Optionally, | |
| 493 | .I syntactical space | |
| 494 | can be inserted before, after, and between the command letter and its | |
| 495 | arguments. | |
| 496 | . | |
| 497 | All of these commands are stackable, i.e., they can be preceded by | |
| 498 | other simple commands or followed by arbitrary other commands on the | |
| 499 | same line. | |
| 500 | . | |
| 465b256c JR |
501 | A separating |
| 502 | .I syntactical space | |
| 503 | is only necessary when two integer arguments would clash or if the | |
| 504 | preceding argument ends with a string argument. | |
| 92d0a6a6 JR |
505 | . |
| 506 | . | |
| 4d3e9548 JL |
507 | .if \n[@USE_ENV_STACK]=1 \{\ |
| 508 | .TP | |
| 92d0a6a6 JR |
509 | .command { |
| 510 | Open a new environment by copying the actual device configuration data | |
| 511 | to the environment stack. | |
| 512 | . | |
| 513 | The current environment is setup by the device specification and | |
| 514 | manipulated by the setting commands. | |
| 515 | . | |
| 516 | . | |
| 4d3e9548 | 517 | .TP |
| 92d0a6a6 JR |
518 | .command } |
| 519 | Close the actual environment (opened by a preceding | |
| 520 | .BR { \~command) | |
| 521 | and restore the previous environment from the environment | |
| 522 | stack as the actual device configuration data. | |
| 523 | . | |
| 4d3e9548 | 524 | .\} \" endif @USE_ENV_STACK |
| 92d0a6a6 JR |
525 | . |
| 526 | . | |
| 4d3e9548 JL |
527 | .TP |
| 528 | .command C xxx \[la]white-space\[ra] | |
| 529 | Print a glyph (special character) named | |
| 530 | .IR xxx . | |
| 92d0a6a6 | 531 | . |
| 465b256c JR |
532 | The trailing |
| 533 | .I syntactical space | |
| 534 | or | |
| 535 | .I line break | |
| 4d3e9548 | 536 | is necessary to allow glyph names of arbitrary length. |
| 92d0a6a6 | 537 | . |
| 4d3e9548 JL |
538 | The glyph is printed at the current print position; the |
| 539 | glyph's size is read from the font file. | |
| 92d0a6a6 JR |
540 | . |
| 541 | The print position is not changed. | |
| 542 | . | |
| 543 | . | |
| 4d3e9548 | 544 | .TP |
| 92d0a6a6 | 545 | .command c c |
| 4d3e9548 JL |
546 | Print glyph with single-letter name\~\c |
| 547 | .I c | |
| 92d0a6a6 | 548 | at the current print position; |
| 4d3e9548 | 549 | the glyph's size is read from the font file. |
| 92d0a6a6 JR |
550 | . |
| 551 | The print position is not changed. | |
| 552 | . | |
| 553 | . | |
| 4d3e9548 | 554 | .TP |
| 92d0a6a6 JR |
555 | .command f n |
| 556 | Set font to font number\~\c | |
| 4d3e9548 | 557 | .I n |
| 92d0a6a6 JR |
558 | (a non-negative integer). |
| 559 | . | |
| 560 | . | |
| 4d3e9548 | 561 | .TP |
| 92d0a6a6 JR |
562 | .command H n |
| 563 | Move right to the absolute vertical position\~\c | |
| 4d3e9548 | 564 | .I n |
| 92d0a6a6 | 565 | (a non-negative integer in basic units\~\c |
| 4d3e9548 | 566 | .BR u ) |
| 92d0a6a6 JR |
567 | relative to left edge of current page. |
| 568 | . | |
| 569 | . | |
| 4d3e9548 | 570 | .TP |
| 92d0a6a6 JR |
571 | .command h n |
| 572 | Move | |
| 4d3e9548 | 573 | .I n |
| 92d0a6a6 | 574 | (a non-negative integer) basic units\~\c |
| 4d3e9548 | 575 | .B u |
| 92d0a6a6 JR |
576 | horizontally to the right. |
| 577 | . | |
| 465b256c | 578 | .I [CSTR\~#54] |
| 92d0a6a6 JR |
579 | allows negative values for |
| 580 | .I n | |
| 581 | also, but | |
| 582 | .I groff | |
| 583 | doesn't use this. | |
| 584 | . | |
| 585 | . | |
| 4d3e9548 JL |
586 | .TP |
| 587 | .command m "color-scheme \fR[\fPcomponent .\|.\|.\fR]\fP" | |
| 92d0a6a6 JR |
588 | Set the color for text (glyphs), line drawing, and the outline of |
| 589 | graphic objects using different color schemes; the analoguous command | |
| 590 | for the filling color of graphic objects is | |
| 591 | .BR DF . | |
| 592 | . | |
| 593 | The color components are specified as integer arguments between 0 and | |
| 594 | \n[@maxcolor]. | |
| 595 | . | |
| 596 | The number of color components and their meaning vary for the | |
| 597 | different color schemes. | |
| 598 | . | |
| 465b256c JR |
599 | These commands are generated by the |
| 600 | .I groff | |
| 601 | escape sequence | |
| 92d0a6a6 JR |
602 | .BR \*[@backslash]m . |
| 603 | . | |
| 604 | No position changing. | |
| 605 | . | |
| 465b256c JR |
606 | These commands are a |
| 607 | .I groff | |
| 608 | extension. | |
| 92d0a6a6 JR |
609 | . |
| 610 | . | |
| 611 | .RS | |
| 612 | . | |
| 4d3e9548 | 613 | .TP |
| 92d0a6a6 JR |
614 | .command mc "cyan magenta yellow" |
| 615 | Set color using the CMY color scheme, having the 3\~color components | |
| 616 | cyan, magenta, and yellow. | |
| 617 | . | |
| 618 | . | |
| 4d3e9548 | 619 | .TP |
| 92d0a6a6 JR |
620 | .command md |
| 621 | Set color to the default color value | |
| 622 | (black in most cases). | |
| 623 | . | |
| 624 | No component arguments. | |
| 625 | . | |
| 626 | . | |
| 4d3e9548 | 627 | .TP |
| 92d0a6a6 JR |
628 | .command mg "gray" |
| 629 | Set color to the shade of gray given by the argument, an integer | |
| 630 | between 0 (black) and \n[@maxcolor] (white). | |
| 631 | . | |
| 632 | . | |
| 4d3e9548 | 633 | .TP |
| 92d0a6a6 JR |
634 | .command mk "cyan magenta yellow black" |
| 635 | Set color using the CMYK color scheme, having the 4\~color components | |
| 636 | cyan, magenta, yellow, and black. | |
| 637 | . | |
| 4d3e9548 | 638 | .TP |
| 92d0a6a6 JR |
639 | .command mr "red green blue" |
| 640 | Set color using the RGB color scheme, having the 3\~color components | |
| 641 | red, green, and blue. | |
| 642 | . | |
| 643 | .RE | |
| 644 | . | |
| 645 | . | |
| 4d3e9548 | 646 | .TP |
| 92d0a6a6 | 647 | .command N n |
| 4d3e9548 JL |
648 | Print glyph with index\~\c |
| 649 | .I n | |
| 92d0a6a6 JR |
650 | (an integer, normally non-negative) of the current font. |
| 651 | . | |
| 652 | The print position is not changed. | |
| 653 | . | |
| 654 | If | |
| 655 | .B \-T\~html | |
| 4d3e9548 JL |
656 | or |
| 657 | .B \-T\~xhtml | |
| 92d0a6a6 JR |
658 | is used, negative values are emitted also to indicate an unbreakable space |
| 659 | with given width. | |
| 660 | . | |
| 661 | For example, | |
| 4d3e9548 JL |
662 | .B N\~\-193 |
| 663 | represents an unbreakable space which has a width of 193\|u. | |
| 92d0a6a6 | 664 | . |
| 465b256c JR |
665 | This command is a |
| 666 | .I groff | |
| 667 | extension. | |
| 92d0a6a6 JR |
668 | . |
| 669 | . | |
| 4d3e9548 | 670 | .TP |
| 92d0a6a6 JR |
671 | .command n b\ a |
| 672 | Inform the device about a line break, but no positioning is done by | |
| 673 | this command. | |
| 674 | . | |
| 465b256c JR |
675 | In |
| 676 | .I classical | |
| 677 | .IR troff , | |
| 678 | the integer arguments | |
| 4d3e9548 | 679 | .I b |
| 92d0a6a6 | 680 | and\~\c |
| 4d3e9548 | 681 | .I a |
| 92d0a6a6 | 682 | informed about the space before and after the current line to |
| 465b256c JR |
683 | make the |
| 684 | .I intermediate output | |
| 685 | more human readable without performing any action. | |
| 92d0a6a6 | 686 | . |
| 465b256c JR |
687 | In |
| 688 | .IR groff , | |
| 689 | they are just ignored, but they must be provided for compatibility | |
| 690 | reasons. | |
| 92d0a6a6 JR |
691 | . |
| 692 | . | |
| 4d3e9548 | 693 | .TP |
| 92d0a6a6 JR |
694 | .command p n |
| 695 | Begin a new page in the outprint. | |
| 696 | . | |
| 697 | The page number is set to\~\c | |
| 4d3e9548 | 698 | .IR n . |
| 92d0a6a6 JR |
699 | . |
| 700 | This page is completely independent of pages formerly processed even | |
| 701 | if those have the same page number. | |
| 702 | . | |
| 703 | The vertical position on the outprint is automatically set to\~0. | |
| 704 | . | |
| 705 | All positioning, writing, and drawing is always done relative to a | |
| 706 | page, so a | |
| 707 | .BR p \~command | |
| 708 | must be issued before any of these commands. | |
| 709 | . | |
| 710 | . | |
| 4d3e9548 | 711 | .TP |
| 92d0a6a6 JR |
712 | .command s n |
| 713 | Set point size to | |
| 4d3e9548 | 714 | .I n |
| 92d0a6a6 JR |
715 | scaled points |
| 716 | (this is unit\~\c | |
| 4d3e9548 | 717 | .B z |
| 92d0a6a6 | 718 | in GNU |
| 465b256c | 719 | .BR @g@troff ). |
| 92d0a6a6 | 720 | . |
| 465b256c JR |
721 | .I Classical troff |
| 722 | used the unit | |
| 92d0a6a6 JR |
723 | .I points |
| 724 | (\c | |
| 4d3e9548 | 725 | .BR p ) |
| 92d0a6a6 JR |
726 | instead; see section |
| 727 | .BR COMPATIBILITY . | |
| 728 | . | |
| 729 | . | |
| 4d3e9548 JL |
730 | .TP |
| 731 | .command t xyz\|.\|.\|. \[la]white-space\[ra] | |
| 732 | .TQ | |
| 733 | .command t "xyz\|.\|.\|.\& dummy-arg" \[la]white-space\[ra] | |
| 734 | Print a word, i.e., a sequence of glyphs with single-letter names | |
| 735 | .IR x , | |
| 736 | .IR y , | |
| 737 | .IR z , | |
| 738 | etc., terminated by a space character or a line break; an optional | |
| 739 | second integer argument is ignored (this allows the formatter to | |
| 740 | generate an even number of arguments). | |
| 741 | . | |
| 742 | The first glyph should be printed at the current position, the | |
| 92d0a6a6 | 743 | current horizontal position should then be increased by the width of |
| 4d3e9548 | 744 | the first glyph, and so on for each glyph. |
| 92d0a6a6 | 745 | . |
| 4d3e9548 | 746 | The widths of the glyph are read from the font file, scaled for the |
| 92d0a6a6 JR |
747 | current point size, and rounded to a multiple of the horizontal |
| 748 | resolution. | |
| 749 | . | |
| 4d3e9548 JL |
750 | Special characters (glyphs with names longer than a single letter) |
| 751 | cannot be printed using this command; use the | |
| 92d0a6a6 | 752 | .B C |
| 4d3e9548 | 753 | command for those glyphs. |
| 92d0a6a6 | 754 | . |
| 465b256c JR |
755 | This command is a |
| 756 | .I groff | |
| 757 | extension; it is only used for devices whose | |
| 92d0a6a6 JR |
758 | .I DESC |
| 759 | file contains the | |
| 760 | .B tcommand | |
| 761 | keyword; see | |
| 762 | .BR groff_font (@MAN5EXT@). | |
| 763 | . | |
| 764 | . | |
| 4d3e9548 JL |
765 | .TP |
| 766 | .command u "n xyz\|.\|.\|." \[la]white-space\[ra] | |
| 92d0a6a6 JR |
767 | Print word with track kerning. |
| 768 | . | |
| 769 | This is the same as the | |
| 770 | .B t | |
| 4d3e9548 | 771 | command except that after printing each glyph, the current |
| 92d0a6a6 | 772 | horizontal position is increased by the sum of the width of that |
| 4d3e9548 JL |
773 | glyph and\~\c |
| 774 | .I n | |
| 92d0a6a6 JR |
775 | (an integer in |
| 776 | basic units\~\c | |
| 4d3e9548 | 777 | .BR u ). |
| 465b256c JR |
778 | This command is a |
| 779 | .I groff | |
| 780 | extension; it is only used for devices whose | |
| 92d0a6a6 JR |
781 | .I DESC |
| 782 | file contains the | |
| 783 | .B tcommand | |
| 784 | keyword; see | |
| 785 | .BR groff_font (@MAN5EXT@). | |
| 786 | . | |
| 787 | . | |
| 4d3e9548 | 788 | .TP |
| 92d0a6a6 JR |
789 | .command V n |
| 790 | Move down to the absolute vertical position\~\c | |
| 4d3e9548 | 791 | .I n |
| 92d0a6a6 | 792 | (a non-negative integer in basic units\~\c |
| 4d3e9548 | 793 | .BR u ) |
| 92d0a6a6 JR |
794 | relative to upper edge of current page. |
| 795 | . | |
| 796 | . | |
| 4d3e9548 | 797 | .TP |
| 92d0a6a6 JR |
798 | .command v n |
| 799 | Move | |
| 4d3e9548 | 800 | .I n |
| 92d0a6a6 | 801 | basic units\~\c |
| 4d3e9548 | 802 | .B u |
| 92d0a6a6 JR |
803 | down |
| 804 | .RI ( n | |
| 805 | is a non-negative integer). | |
| 806 | . | |
| 465b256c | 807 | .I [CSTR\~#54] |
| 92d0a6a6 JR |
808 | allows negative values for |
| 809 | .I n | |
| 810 | also, but | |
| 811 | .I groff | |
| 812 | doesn't use this. | |
| 813 | . | |
| 814 | . | |
| 4d3e9548 | 815 | .TP |
| 92d0a6a6 JR |
816 | .command w |
| 817 | Informs about a paddable whitespace to increase readability. | |
| 818 | . | |
| 819 | The spacing itself must be performed explicitly by a move command. | |
| 820 | . | |
| 821 | . | |
| 822 | .\" -------------------------------------------------------------------- | |
| 823 | .SS "Graphics Commands" | |
| 824 | .\" -------------------------------------------------------------------- | |
| 825 | . | |
| 465b256c JR |
826 | Each graphics or drawing command in the |
| 827 | .I intermediate output | |
| 828 | starts with the letter\~\c | |
| 92d0a6a6 JR |
829 | .B D |
| 830 | followed by one or two characters that specify a subcommand; this | |
| 831 | is followed by a fixed or variable number of integer arguments that | |
| 832 | are separated by a single space character. | |
| 833 | . | |
| 834 | A | |
| 465b256c JR |
835 | .B D\c |
| 836 | \~command | |
| 837 | may not be followed by another command on the same line (apart from a | |
| 838 | comment), so each | |
| 839 | .B D\c | |
| 840 | \~command | |
| 841 | is terminated by a | |
| 842 | .I syntactical line | |
| 843 | .IR break . | |
| 844 | . | |
| 92d0a6a6 JR |
845 | . |
| 846 | .P | |
| 465b256c | 847 | .B @g@troff |
| 92d0a6a6 JR |
848 | output follows the classical spacing rules (no space between command |
| 849 | and subcommand, all arguments are preceded by a single space | |
| 850 | character), but the parser allows optional space between the command | |
| 851 | letters and makes the space before the first argument optional. | |
| 852 | . | |
| 853 | As usual, each space can be any sequence of tab and space characters. | |
| 854 | . | |
| 465b256c | 855 | . |
| 92d0a6a6 JR |
856 | .P |
| 857 | Some graphics commands can take a variable number of arguments. | |
| 858 | . | |
| 859 | In this case, they are integers representing a size measured in basic | |
| 860 | units\~\c | |
| 4d3e9548 | 861 | .BR u . |
| 92d0a6a6 | 862 | . |
| 4d3e9548 JL |
863 | The |
| 864 | .I h | |
| 865 | arguments | |
| 92d0a6a6 JR |
866 | stand for horizontal distances where positive means right, negative |
| 867 | left. | |
| 868 | . | |
| 4d3e9548 JL |
869 | The |
| 870 | .I v | |
| 871 | arguments | |
| 92d0a6a6 JR |
872 | stand for vertical distances where positive means down, negative up. |
| 873 | . | |
| 874 | All these distances are offsets relative to the current location. | |
| 875 | . | |
| 465b256c | 876 | . |
| 92d0a6a6 JR |
877 | .P |
| 878 | Unless indicated otherwise, each graphics command directly corresponds | |
| 879 | to a similar | |
| 880 | .I groff | |
| 881 | .B \*[@backslash]D | |
| 882 | escape sequence; see | |
| 883 | .BR groff (@MAN7EXT@). | |
| 884 | . | |
| 465b256c | 885 | . |
| 92d0a6a6 | 886 | .P |
| 465b256c JR |
887 | Unknown |
| 888 | .B D\c | |
| 889 | \~commands are assumed to be device-specific. | |
| 92d0a6a6 JR |
890 | . |
| 891 | Its arguments are parsed as strings; the whole information is then | |
| 892 | sent to the postprocessor. | |
| 893 | . | |
| 465b256c | 894 | . |
| 92d0a6a6 JR |
895 | .P |
| 896 | In the following command reference, the syntax element | |
| 4d3e9548 | 897 | .I \[la]line-break\[ra] |
| 92d0a6a6 JR |
898 | means a |
| 899 | .I syntactical line break | |
| 900 | as defined in section | |
| 901 | .BR Separation . | |
| 902 | . | |
| 903 | . | |
| 4d3e9548 | 904 | .TP |
| 92d0a6a6 JR |
905 | .D-multiarg ~ |
| 906 | Draw B-spline from current position to offset | |
| 907 | .indexed_offset h 1 v 1 , | |
| 908 | then to offset | |
| 909 | .indexed_offset h 2 v 2 | |
| 4d3e9548 | 910 | if given, etc., up to |
| 92d0a6a6 | 911 | .indexed_offset h n v n . |
| 465b256c JR |
912 | This command takes a variable number of argument pairs; the current |
| 913 | position is moved to the terminal point of the drawn curve. | |
| 92d0a6a6 JR |
914 | . |
| 915 | . | |
| 4d3e9548 | 916 | .TP |
| 92d0a6a6 JR |
917 | .Da-command |
| 918 | Draw arc from current position to | |
| 919 | .indexed_offset h 1 v 1 \|+\|\c | |
| 920 | .indexed_offset h 2 v 2 | |
| 921 | with center at | |
| 922 | .indexed_offset h 1 v 1 ; | |
| 923 | then move the current position to the final point of the arc. | |
| 924 | . | |
| 925 | . | |
| 4d3e9548 | 926 | .TP |
| 92d0a6a6 | 927 | .D-command C d |
| 4d3e9548 JL |
928 | .TQ |
| 929 | .D-command C "d dummy-arg" | |
| 92d0a6a6 | 930 | Draw a solid circle using the current fill color with diameter\~\c |
| 4d3e9548 | 931 | .I d |
| 92d0a6a6 | 932 | (integer in basic units\~\c |
| 4d3e9548 | 933 | .BR u ) |
| 92d0a6a6 JR |
934 | with leftmost point at the current position; then move the current |
| 935 | position to the rightmost point of the circle. | |
| 936 | . | |
| 937 | An optional second integer argument is ignored (this allows to the | |
| 938 | formatter to generate an even number of arguments). | |
| 939 | . | |
| 465b256c JR |
940 | This command is a |
| 941 | .I groff | |
| 942 | extension. | |
| 92d0a6a6 JR |
943 | . |
| 944 | . | |
| 4d3e9548 | 945 | .TP |
| 92d0a6a6 JR |
946 | .D-command c d |
| 947 | Draw circle line with diameter\~\c | |
| 4d3e9548 | 948 | .I d |
| 92d0a6a6 | 949 | (integer in basic units\~\c |
| 4d3e9548 | 950 | .BR u ) |
| 92d0a6a6 JR |
951 | with leftmost point at the current position; then move the current |
| 952 | position to the rightmost point of the circle. | |
| 953 | . | |
| 954 | . | |
| 4d3e9548 | 955 | .TP |
| 92d0a6a6 JR |
956 | .D-command E "h v" |
| 957 | Draw a solid ellipse in the current fill color with a horizontal | |
| 958 | diameter of\~\c | |
| 4d3e9548 | 959 | .I h |
| 92d0a6a6 | 960 | and a vertical diameter of\~\c |
| 4d3e9548 | 961 | .I v |
| 92d0a6a6 | 962 | (both integers in basic units\~\c |
| 4d3e9548 | 963 | .BR u ) |
| 92d0a6a6 JR |
964 | with the leftmost point at the current position; then move to the |
| 965 | rightmost point of the ellipse. | |
| 966 | . | |
| 465b256c JR |
967 | This command is a |
| 968 | .I groff | |
| 969 | extension. | |
| 92d0a6a6 JR |
970 | . |
| 971 | . | |
| 4d3e9548 | 972 | .TP |
| 92d0a6a6 JR |
973 | .D-command e "h v" |
| 974 | Draw an outlined ellipse with a horizontal diameter of\~\c | |
| 4d3e9548 | 975 | .I h |
| 92d0a6a6 | 976 | and a vertical diameter of\~\c |
| 4d3e9548 | 977 | .I v |
| 92d0a6a6 | 978 | (both integers in basic units\~\c |
| 4d3e9548 | 979 | .BR u ) |
| 92d0a6a6 JR |
980 | with the leftmost point at current position; then move to the |
| 981 | rightmost point of the ellipse. | |
| 982 | . | |
| 983 | . | |
| 4d3e9548 JL |
984 | .TP |
| 985 | .D-command F "color-scheme \fR[\fPcomponent .\|.\|.\fR]\fP" | |
| 92d0a6a6 JR |
986 | Set fill color for solid drawing objects using different color |
| 987 | schemes; the analoguous command for setting the color of text, line | |
| 988 | graphics, and the outline of graphic objects is | |
| 989 | .BR m . | |
| 990 | . | |
| 991 | The color components are specified as integer arguments between 0 and | |
| 992 | \n[@maxcolor]. | |
| 993 | . | |
| 994 | The number of color components and their meaning vary for the | |
| 995 | different color schemes. | |
| 996 | . | |
| 465b256c JR |
997 | These commands are generated by the |
| 998 | .I groff | |
| 999 | escape sequences | |
| 4d3e9548 | 1000 | .BR \*[@backslash]D'F\ .\|.\|. ' |
| 92d0a6a6 JR |
1001 | and |
| 1002 | .B \*[@backslash]M | |
| 1003 | (with no other corresponding graphics commands). | |
| 1004 | . | |
| 1005 | No position changing. | |
| 1006 | . | |
| 465b256c JR |
1007 | This command is a |
| 1008 | .I groff | |
| 1009 | extension. | |
| 92d0a6a6 JR |
1010 | . |
| 1011 | . | |
| 1012 | .RS | |
| 1013 | . | |
| 4d3e9548 | 1014 | .TP |
| 92d0a6a6 JR |
1015 | .D-command Fc "cyan magenta yellow" |
| 1016 | Set fill color for solid drawing objects using the CMY color scheme, | |
| 1017 | having the 3\~color components cyan, magenta, and yellow. | |
| 1018 | . | |
| 1019 | . | |
| 4d3e9548 | 1020 | .TP |
| 92d0a6a6 JR |
1021 | .D-command Fd |
| 1022 | Set fill color for solid drawing objects to the default fill color value | |
| 1023 | (black in most cases). | |
| 1024 | . | |
| 1025 | No component arguments. | |
| 1026 | . | |
| 1027 | . | |
| 4d3e9548 | 1028 | .TP |
| 92d0a6a6 JR |
1029 | .D-command Fg "gray" |
| 1030 | Set fill color for solid drawing objects to the shade of gray given by | |
| 1031 | the argument, an integer between 0 (black) and \n[@maxcolor] (white). | |
| 1032 | . | |
| 1033 | . | |
| 4d3e9548 | 1034 | .TP |
| 92d0a6a6 JR |
1035 | .D-command Fk "cyan magenta yellow black" |
| 1036 | Set fill color for solid drawing objects using the CMYK color scheme, | |
| 1037 | having the 4\~color components cyan, magenta, yellow, and black. | |
| 1038 | . | |
| 4d3e9548 | 1039 | .TP |
| 92d0a6a6 JR |
1040 | .D-command Fr "red green blue" |
| 1041 | Set fill color for solid drawing objects using the RGB color scheme, | |
| 1042 | having the 3\~color components red, green, and blue. | |
| 1043 | . | |
| 1044 | .RE | |
| 1045 | . | |
| 1046 | . | |
| 4d3e9548 | 1047 | .TP |
| 92d0a6a6 JR |
1048 | .D-command f n |
| 1049 | The argument | |
| 4d3e9548 | 1050 | .I n |
| 92d0a6a6 JR |
1051 | must be an integer in the range -32767 to 32767. |
| 1052 | . | |
| 1053 | .RS | |
| 1054 | .TP | |
| 4d3e9548 | 1055 | .RI 0\|\[<=]\| n \|\[<=]\|1000 |
| 92d0a6a6 JR |
1056 | Set the color for filling solid drawing objects to a shade of gray, |
| 1057 | where 0 corresponds to solid white, 1000 (the default) to solid black, | |
| 4d3e9548 | 1058 | and values inbetween to intermediate shades of gray; this is |
| 92d0a6a6 JR |
1059 | obsoleted by command |
| 1060 | .BR DFg . | |
| 1061 | . | |
| 1062 | .TP | |
| 4d3e9548 | 1063 | .IR n "\|<\|0 or " n \|>\|1000 |
| 92d0a6a6 JR |
1064 | Set the filling color to the color that is currently being used for |
| 1065 | the text and the outline, see command | |
| 1066 | .BR m . | |
| 1067 | For example, the command sequence | |
| 1068 | . | |
| 92d0a6a6 | 1069 | .RS |
| 4d3e9548 JL |
1070 | .IP |
| 1071 | .EX | |
| 92d0a6a6 JR |
1072 | mg 0 0 \n[@maxcolor] |
| 1073 | Df -1 | |
| 4d3e9548 | 1074 | .EE |
| 92d0a6a6 | 1075 | .RE |
| 92d0a6a6 | 1076 | . |
| 4d3e9548 | 1077 | .IP |
| 92d0a6a6 | 1078 | sets all colors to blue. |
| 465b256c | 1079 | . |
| 92d0a6a6 JR |
1080 | .P |
| 1081 | No position changing. | |
| 1082 | . | |
| 465b256c JR |
1083 | This command is a |
| 1084 | .I groff | |
| 1085 | extension. | |
| 92d0a6a6 JR |
1086 | . |
| 1087 | .RE | |
| 1088 | . | |
| 1089 | . | |
| 4d3e9548 | 1090 | .TP |
| 92d0a6a6 JR |
1091 | .D-command l "h v" |
| 1092 | Draw line from current position to offset | |
| 1093 | .offset h v | |
| 1094 | (integers in basic units\~\c | |
| 4d3e9548 | 1095 | .BR u ); |
| 92d0a6a6 JR |
1096 | then set current position to the end of the drawn line. |
| 1097 | . | |
| 1098 | . | |
| 4d3e9548 | 1099 | .TP |
| 92d0a6a6 JR |
1100 | .D-multiarg p |
| 1101 | Draw a polygon line from current position to offset | |
| 4d3e9548 | 1102 | .indexed_offset h 1 v 1 , |
| 92d0a6a6 | 1103 | from there to offset |
| 4d3e9548 JL |
1104 | .indexed_offset h 2 v 2 , |
| 1105 | etc., up to offset | |
| 1106 | .indexed_offset h n v n , | |
| 92d0a6a6 JR |
1107 | and from there back to the starting position. |
| 1108 | . | |
| 4d3e9548 | 1109 | .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 92d0a6a6 JR |
1110 | For historical reasons, the position is changed by adding the sum of |
| 1111 | all arguments with odd index to the actual horizontal position and the | |
| 1112 | even ones to the vertical position. | |
| 1113 | . | |
| 1114 | Although this doesn't make sense it is kept for compatibility. | |
| 1115 | . | |
| 4d3e9548 | 1116 | .\} |
| 92d0a6a6 JR |
1117 | .el \{\ |
| 1118 | As the polygon is closed, the end of drawing is the starting point, so | |
| 1119 | the position doesn't change. | |
| 4d3e9548 | 1120 | .\} |
| 92d0a6a6 | 1121 | . |
| 465b256c JR |
1122 | This command is a |
| 1123 | .I groff | |
| 1124 | extension. | |
| 92d0a6a6 JR |
1125 | . |
| 1126 | . | |
| 4d3e9548 | 1127 | .TP |
| 92d0a6a6 JR |
1128 | .D-multiarg P |
| 1129 | The same macro as the corresponding | |
| 1130 | .B Dp | |
| 1131 | command with the same arguments, but draws a solid polygon in the | |
| 1132 | current fill color rather than an outlined polygon. | |
| 1133 | . | |
| 4d3e9548 | 1134 | .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 92d0a6a6 JR |
1135 | The position is changed in the same way as with |
| 1136 | .BR Dp . | |
| 4d3e9548 | 1137 | .\} |
| 92d0a6a6 JR |
1138 | .el \ |
| 1139 | No position changing. | |
| 1140 | . | |
| 465b256c JR |
1141 | This command is a |
| 1142 | .I groff | |
| 1143 | extension. | |
| 92d0a6a6 JR |
1144 | . |
| 1145 | . | |
| 4d3e9548 | 1146 | .TP |
| 92d0a6a6 JR |
1147 | .D-command t n |
| 1148 | Set the current line thickness to\~\c | |
| 4d3e9548 | 1149 | .I n |
| 92d0a6a6 | 1150 | (an integer in basic units\~\c |
| 4d3e9548 | 1151 | .BR u ) |
| 92d0a6a6 | 1152 | if |
| 4d3e9548 | 1153 | .IR n \|>\|0; |
| 92d0a6a6 | 1154 | if |
| 4d3e9548 | 1155 | .IR n \|=\|0 |
| 92d0a6a6 | 1156 | select the smallest available line thickness; if |
| 4d3e9548 | 1157 | .IR n \|<\|0 |
| 92d0a6a6 JR |
1158 | set the line thickness proportional to the point size (this is the |
| 1159 | default before the first | |
| 1160 | .B Dt | |
| 1161 | command was specified). | |
| 1162 | . | |
| 4d3e9548 | 1163 | .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 92d0a6a6 JR |
1164 | For historical reasons, the horizontal position is changed by adding |
| 1165 | the argument to the actual horizontal position, while the vertical | |
| 1166 | position is not changed. | |
| 1167 | . | |
| 1168 | Although this doesn't make sense it is kept for compatibility. | |
| 1169 | . | |
| 4d3e9548 | 1170 | .\} |
| 92d0a6a6 JR |
1171 | .el \ |
| 1172 | No position changing. | |
| 1173 | . | |
| 465b256c JR |
1174 | This command is a |
| 1175 | .I groff | |
| 1176 | extension. | |
| 92d0a6a6 JR |
1177 | . |
| 1178 | . | |
| 1179 | .\" -------------------------------------------------------------------- | |
| 1180 | .SS "Device Control Commands" | |
| 1181 | .\" -------------------------------------------------------------------- | |
| 1182 | . | |
| 1183 | Each device control command starts with the letter | |
| 1184 | .B x | |
| 1185 | followed by a space character (optional or arbitrary space/\:tab in | |
| 465b256c JR |
1186 | .IR groff ) |
| 1187 | and a subcommand letter or word; each argument (if any) must be | |
| 1188 | preceded by a | |
| 1189 | .I syntactical | |
| 1190 | .IR space . | |
| 92d0a6a6 JR |
1191 | . |
| 1192 | All | |
| 1193 | .B x | |
| 1194 | commands are terminated by a | |
| 1195 | .IR "syntactical line break" ; | |
| 1196 | no device control command can be followed by another command on the same | |
| 1197 | line (except a comment). | |
| 1198 | . | |
| 1199 | .P | |
| 1200 | The subcommand is basically a single letter, but to increase | |
| 465b256c | 1201 | readability, it can be written as a word, i.e., an arbitrary sequence |
| 92d0a6a6 JR |
1202 | of characters terminated by the next tab, space, or newline character. |
| 1203 | . | |
| 1204 | All characters of the subcommand word but the first are simply ignored. | |
| 1205 | . | |
| 1206 | For example, | |
| 465b256c | 1207 | .B @g@troff |
| 92d0a6a6 JR |
1208 | outputs the initialization command |
| 1209 | .B x\ i | |
| 1210 | as | |
| 1211 | .B x\ init | |
| 1212 | and the resolution command | |
| 1213 | .B x\ r | |
| 1214 | as | |
| 1215 | .BR "x\ res" . | |
| 1216 | . | |
| 1217 | But writings like | |
| 1218 | .B x\ i_like_groff | |
| 1219 | and | |
| 1220 | .B x\ roff_is_groff | |
| 4d3e9548 | 1221 | are accepted as well to mean the same commands. |
| 92d0a6a6 JR |
1222 | . |
| 1223 | .P | |
| 1224 | In the following, the syntax element | |
| 4d3e9548 | 1225 | .I \[la]line-break\[ra] |
| 92d0a6a6 JR |
1226 | means a |
| 1227 | .I syntactical line break | |
| 1228 | as defined in section | |
| 1229 | .BR Separation . | |
| 1230 | . | |
| 4d3e9548 | 1231 | .TP |
| 92d0a6a6 JR |
1232 | .x-command F name |
| 1233 | .xsub Filename | |
| 1234 | Use | |
| 4d3e9548 | 1235 | .I name |
| 92d0a6a6 JR |
1236 | as the intended name for the current file in error reports. |
| 1237 | . | |
| 465b256c JR |
1238 | This is useful for remembering the original file name when |
| 1239 | .B groff | |
| 1240 | uses an internal piping mechanism. | |
| 92d0a6a6 JR |
1241 | . |
| 1242 | The input file is not changed by this command. | |
| 1243 | . | |
| 465b256c JR |
1244 | This command is a |
| 1245 | .I groff | |
| 1246 | extension. | |
| 92d0a6a6 JR |
1247 | . |
| 1248 | . | |
| 4d3e9548 | 1249 | .TP |
| 92d0a6a6 JR |
1250 | .x-command f "n\ s" |
| 1251 | .xsub font | |
| 1252 | Mount font position\~\c | |
| 4d3e9548 | 1253 | .I n |
| 92d0a6a6 | 1254 | (a non-negative integer) with font named\~\c |
| 4d3e9548 | 1255 | .I s |
| 92d0a6a6 JR |
1256 | (a text word), |
| 1257 | cf. | |
| 1258 | .BR groff_font (@MAN5EXT@). | |
| 1259 | . | |
| 1260 | . | |
| 4d3e9548 | 1261 | .TP |
| 92d0a6a6 JR |
1262 | .x-command H n |
| 1263 | .xsub Height | |
| 1264 | Set character height to\~\c | |
| 4d3e9548 | 1265 | .I n |
| 92d0a6a6 | 1266 | (a positive integer in scaled points\~\c |
| 4d3e9548 | 1267 | .BR z ). |
| 92d0a6a6 | 1268 | . |
| 465b256c JR |
1269 | .I Classical troff |
| 1270 | used the unit points (\c | |
| 4d3e9548 | 1271 | .BR p ) |
| 92d0a6a6 JR |
1272 | instead; see section |
| 1273 | .BR COMPATIBILITY . | |
| 1274 | . | |
| 1275 | . | |
| 4d3e9548 | 1276 | .TP |
| 92d0a6a6 JR |
1277 | .x-command i |
| 1278 | .xsub init | |
| 1279 | Initialize device. | |
| 1280 | . | |
| 465b256c JR |
1281 | This is the third command of the |
| 1282 | .IR prologue . | |
| 92d0a6a6 JR |
1283 | . |
| 1284 | . | |
| 4d3e9548 | 1285 | .TP |
| 92d0a6a6 JR |
1286 | .x-command p |
| 1287 | .xsub pause | |
| 1288 | Parsed but ignored. | |
| 1289 | . | |
| 1290 | The classical documentation reads | |
| 1291 | .I pause device, can be | |
| 1292 | .IR restarted . | |
| 1293 | . | |
| 1294 | . | |
| 4d3e9548 | 1295 | .TP |
| 92d0a6a6 JR |
1296 | .x-command r "n\ h\ v" |
| 1297 | .xsub resolution | |
| 1298 | Resolution is\~\c | |
| 4d3e9548 | 1299 | .IR n , |
| 92d0a6a6 | 1300 | while |
| 4d3e9548 | 1301 | .I h |
| 92d0a6a6 | 1302 | is the minimal horizontal motion, and |
| 4d3e9548 | 1303 | .I v |
| 92d0a6a6 JR |
1304 | the minimal vertical motion possible with this device; all arguments |
| 1305 | are positive integers in basic units\~\c | |
| 4d3e9548 | 1306 | .B u |
| 92d0a6a6 JR |
1307 | per inch. |
| 1308 | . | |
| 465b256c JR |
1309 | This is the second command of the |
| 1310 | .IR prologue . | |
| 92d0a6a6 JR |
1311 | . |
| 1312 | . | |
| 4d3e9548 | 1313 | .TP |
| 92d0a6a6 JR |
1314 | .x-command S n |
| 1315 | .xsub Slant | |
| 1316 | Set slant to\~\c | |
| 4d3e9548 | 1317 | .I n |
| 92d0a6a6 | 1318 | degrees (an integer in basic units\~\c |
| 4d3e9548 | 1319 | .BR u ). |
| 92d0a6a6 JR |
1320 | . |
| 1321 | . | |
| 4d3e9548 | 1322 | .TP |
| 92d0a6a6 JR |
1323 | .x-command s |
| 1324 | .xsub stop | |
| 1325 | Terminates the processing of the current file; issued as the last | |
| 465b256c JR |
1326 | command of any |
| 1327 | .I intermediate @g@troff | |
| 1328 | .IR output . | |
| 92d0a6a6 JR |
1329 | . |
| 1330 | . | |
| 4d3e9548 | 1331 | .TP |
| 92d0a6a6 JR |
1332 | .x-command t |
| 1333 | .xsub trailer | |
| 1334 | Generate trailer information, if any. | |
| 1335 | . | |
| 1336 | In | |
| 465b256c | 1337 | .BR groff , |
| 92d0a6a6 JR |
1338 | this is actually just ignored. |
| 1339 | . | |
| 1340 | . | |
| 4d3e9548 | 1341 | .TP |
| 92d0a6a6 JR |
1342 | .x-command T xxx |
| 1343 | .xsub Typesetter | |
| 1344 | Set name of device to word | |
| 4d3e9548 | 1345 | .IR xxx , |
| 92d0a6a6 JR |
1346 | a sequence of characters ended by the next whitespace character. |
| 1347 | . | |
| 1348 | The possible device names coincide with those from the groff | |
| 4d3e9548 | 1349 | .B \-T |
| 92d0a6a6 JR |
1350 | option. |
| 1351 | . | |
| 465b256c JR |
1352 | This is the first command of the |
| 1353 | .IR prologue . | |
| 92d0a6a6 JR |
1354 | . |
| 1355 | . | |
| 4d3e9548 | 1356 | .TP |
| 92d0a6a6 JR |
1357 | .x-command u n |
| 1358 | .xsub underline | |
| 1359 | Configure underlining of spaces. | |
| 1360 | . | |
| 1361 | If | |
| 4d3e9548 | 1362 | .I n |
| 92d0a6a6 JR |
1363 | is\~1, start underlining of spaces; |
| 1364 | if | |
| 4d3e9548 | 1365 | .I n |
| 92d0a6a6 JR |
1366 | is\~0, stop underlining of spaces. |
| 1367 | . | |
| 1368 | This is needed for the | |
| 1369 | .B cu | |
| 1370 | request in | |
| 465b256c | 1371 | .B @g@nroff |
| 92d0a6a6 JR |
1372 | mode and is ignored otherwise. |
| 1373 | . | |
| 465b256c JR |
1374 | This command is a |
| 1375 | .I groff | |
| 1376 | extension. | |
| 92d0a6a6 JR |
1377 | . |
| 1378 | . | |
| 4d3e9548 | 1379 | .TP |
| 92d0a6a6 JR |
1380 | .x-command X anything |
| 1381 | .xsub X-escape | |
| 1382 | Send string | |
| 4d3e9548 | 1383 | .I anything |
| 92d0a6a6 JR |
1384 | uninterpreted to the device. |
| 1385 | . | |
| 1386 | If the line following this command starts with a | |
| 1387 | .B + | |
| 1388 | character this line is interpreted as a continuation line in the | |
| 1389 | following sense. | |
| 1390 | . | |
| 1391 | The | |
| 1392 | .B + | |
| 1393 | is ignored, but a newline character is sent instead to the device, the | |
| 1394 | rest of the line is sent uninterpreted. | |
| 1395 | . | |
| 1396 | The same applies to all following lines until the first character of a | |
| 1397 | line is not a | |
| 1398 | .B + | |
| 1399 | character. | |
| 1400 | . | |
| 1401 | This command is generated by the | |
| 1402 | .I groff | |
| 1403 | escape sequence | |
| 1404 | .BR \*[@backslash]X . | |
| 1405 | . | |
| 465b256c JR |
1406 | The line-continuing feature is a |
| 1407 | .I groff | |
| 1408 | extension. | |
| 92d0a6a6 JR |
1409 | . |
| 1410 | . | |
| 1411 | .\" -------------------------------------------------------------------- | |
| 1412 | .SS "Obsolete Command" | |
| 1413 | .\" -------------------------------------------------------------------- | |
| 1414 | . | |
| 1415 | In | |
| 1416 | .I classical troff | |
| 4d3e9548 | 1417 | output, emitting a single glyph was mostly done by a very |
| 92d0a6a6 | 1418 | strange command that combined a horizontal move and the printing of a |
| 4d3e9548 | 1419 | glyph. |
| 92d0a6a6 JR |
1420 | . |
| 1421 | It didn't have a command code, but is represented by a 3-character | |
| 1422 | argument consisting of exactly 2\~digits and a character. | |
| 1423 | . | |
| 1424 | .TP | |
| 4d3e9548 | 1425 | .I ddc |
| 92d0a6a6 | 1426 | Move right |
| 4d3e9548 | 1427 | .I dd |
| 92d0a6a6 | 1428 | (exactly two decimal digits) basic units\~\c |
| 4d3e9548 JL |
1429 | .BR u , |
| 1430 | then print glyph with single-letter name\~\c | |
| 1431 | .IR c . | |
| 92d0a6a6 | 1432 | . |
| 465b256c | 1433 | . |
| 92d0a6a6 JR |
1434 | .RS |
| 1435 | .P | |
| 465b256c JR |
1436 | In |
| 1437 | .IR groff , | |
| 1438 | arbitrary | |
| 1439 | .I syntactical space | |
| 1440 | around and within this command is allowed to be added. | |
| 92d0a6a6 JR |
1441 | . |
| 1442 | Only when a preceding command on the same line ends with an argument | |
| 1443 | of variable length a separating space is obligatory. | |
| 1444 | . | |
| 1445 | In | |
| 1446 | .I classical | |
| 1447 | .IR troff , | |
| 1448 | large clusters of these and other commands were used, mostly without | |
| 1449 | spaces; this made such output almost unreadable. | |
| 1450 | . | |
| 1451 | .RE | |
| 1452 | . | |
| 465b256c | 1453 | . |
| 92d0a6a6 JR |
1454 | .P |
| 1455 | For modern high-resolution devices, this command does not make sense | |
| 4d3e9548 | 1456 | because the width of the glyphs can become much larger than two |
| 92d0a6a6 JR |
1457 | decimal digits. |
| 1458 | . | |
| 465b256c JR |
1459 | In |
| 1460 | .BR groff , | |
| 1461 | this is only used for the devices | |
| 92d0a6a6 JR |
1462 | .BR X75 , |
| 1463 | .BR X75-12 , | |
| 1464 | .BR X100 , | |
| 1465 | and | |
| 1466 | .BR X100-12 . | |
| 1467 | . | |
| 1468 | For other devices, | |
| 1469 | the commands | |
| 1470 | .B t | |
| 1471 | and\~\c | |
| 1472 | .B u | |
| 1473 | provide a better functionality. | |
| 1474 | . | |
| 1475 | . | |
| 1476 | .\" -------------------------------------------------------------------- | |
| 1477 | .SH "POSTPROCESSING" | |
| 1478 | .\" -------------------------------------------------------------------- | |
| 1479 | . | |
| 1480 | The | |
| 1481 | .I roff | |
| 1482 | postprocessors are programs that have the task to translate the | |
| 465b256c JR |
1483 | .I intermediate output |
| 1484 | into actions that are sent to a device. | |
| 92d0a6a6 JR |
1485 | . |
| 1486 | A device can be some piece of hardware such as a printer, or a software | |
| 1487 | file format suitable for graphical or text processing. | |
| 1488 | . | |
| 1489 | The | |
| 1490 | .I groff | |
| 1491 | system provides powerful means that make the programming of such | |
| 1492 | postprocessors an easy task. | |
| 1493 | .P | |
| 465b256c JR |
1494 | There is a library function that parses the |
| 1495 | .I intermediate output | |
| 1496 | and sends the information obtained to the device via methods of a | |
| 1497 | class with a common interface for each device. | |
| 92d0a6a6 JR |
1498 | . |
| 1499 | So a | |
| 1500 | .I groff | |
| 1501 | postprocessor must only redefine the methods of this class. | |
| 1502 | . | |
| 1503 | For details, see the reference in section | |
| 1504 | .BR FILES . | |
| 1505 | . | |
| 1506 | . | |
| 1507 | .\" -------------------------------------------------------------------- | |
| 1508 | .SH "EXAMPLES" | |
| 1509 | .\" -------------------------------------------------------------------- | |
| 1510 | . | |
| 465b256c JR |
1511 | This section presents the |
| 1512 | .I intermediate output | |
| 1513 | generated from the same input for three different devices. | |
| 92d0a6a6 JR |
1514 | . |
| 1515 | The input is the sentence | |
| 1516 | .I hell world | |
| 465b256c JR |
1517 | fed into |
| 1518 | .B groff | |
| 1519 | on the command line. | |
| 1520 | . | |
| 92d0a6a6 | 1521 | . |
| 4d3e9548 | 1522 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1523 | High-resolution device |
| 1524 | .I ps | |
| 1525 | . | |
| 92d0a6a6 | 1526 | . |
| 465b256c | 1527 | .RS |
| 92d0a6a6 | 1528 | .P |
| 4d3e9548 JL |
1529 | .EX |
| 1530 | \fBshell>\fP echo "hell world" | groff -Z -T ps | |
| 1531 | .EE | |
| 92d0a6a6 | 1532 | . |
| 465b256c | 1533 | . |
| 92d0a6a6 JR |
1534 | .P |
| 1535 | .nf | |
| 1536 | .ft CB | |
| 1537 | x T ps | |
| 1538 | x res 72000 1 1 | |
| 1539 | x init | |
| 1540 | p1 | |
| 1541 | x font 5 TR | |
| 1542 | f5 | |
| 1543 | s10000 | |
| 1544 | V12000 | |
| 1545 | H72000 | |
| 1546 | thell | |
| 1547 | wh2500 | |
| 1548 | tw | |
| 1549 | H96620 | |
| 1550 | torld | |
| 1551 | n12000 0 | |
| 1552 | x trailer | |
| 1553 | V792000 | |
| 1554 | x stop | |
| 1555 | .ft P | |
| 1556 | .fi | |
| 1557 | .RE | |
| 1558 | . | |
| 465b256c | 1559 | . |
| 92d0a6a6 JR |
1560 | .P |
| 1561 | This output can be fed into the postprocessor | |
| 1562 | .BR grops (@MAN1EXT@) | |
| 1563 | to get its representation as a PostScript file. | |
| 1564 | . | |
| 1565 | . | |
| 4d3e9548 | 1566 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1567 | Low-resolution device |
| 1568 | .I latin1 | |
| 1569 | . | |
| 92d0a6a6 | 1570 | . |
| 465b256c | 1571 | .RS |
| 92d0a6a6 JR |
1572 | .P |
| 1573 | This is similar to the high-resolution device except that the | |
| 1574 | positioning is done at a minor scale. | |
| 1575 | . | |
| 1576 | Some comments (lines starting with | |
| 1577 | .IR # ) | |
| 1578 | were added for clarification; they were not generated by the | |
| 1579 | formatter. | |
| 1580 | . | |
| 465b256c | 1581 | . |
| 92d0a6a6 | 1582 | .P |
| 4d3e9548 JL |
1583 | .EX |
| 1584 | \fBshell>\fP "hell world" | groff -Z -T latin1 | |
| 1585 | .EE | |
| 92d0a6a6 | 1586 | . |
| 465b256c | 1587 | . |
| 92d0a6a6 JR |
1588 | .P |
| 1589 | .nf | |
| 465b256c | 1590 | .I "# prologue" |
| 92d0a6a6 JR |
1591 | .ft CB |
| 1592 | x T latin1 | |
| 1593 | x res 240 24 40 | |
| 1594 | x init | |
| 465b256c | 1595 | .I "# begin a new page" |
| 92d0a6a6 JR |
1596 | .ft CB |
| 1597 | p1 | |
| 465b256c | 1598 | .I "# font setup" |
| 92d0a6a6 JR |
1599 | .ft CB |
| 1600 | x font 1 R | |
| 1601 | f1 | |
| 1602 | s10 | |
| 465b256c | 1603 | .I "# initial positioning on the page" |
| 92d0a6a6 JR |
1604 | .ft CB |
| 1605 | V40 | |
| 1606 | H0 | |
| 465b256c | 1607 | .I "# write text `hell'" |
| 92d0a6a6 JR |
1608 | .ft CB |
| 1609 | thell | |
| 465b256c | 1610 | .I "# inform about a space, and do it by a horizontal jump" |
| 92d0a6a6 JR |
1611 | .ft CB |
| 1612 | wh24 | |
| 465b256c | 1613 | .I "# write text `world'" |
| 92d0a6a6 JR |
1614 | .ft CB |
| 1615 | tworld | |
| 465b256c | 1616 | .I "# announce line break, but do nothing because ..." |
| 92d0a6a6 JR |
1617 | .ft CB |
| 1618 | n40 0 | |
| 465b256c | 1619 | .I "# ... the end of the document has been reached" |
| 92d0a6a6 JR |
1620 | .ft CB |
| 1621 | x trailer | |
| 1622 | V2640 | |
| 1623 | x stop | |
| 1624 | .ft P | |
| 1625 | .fi | |
| 1626 | .RE | |
| 1627 | . | |
| 465b256c | 1628 | . |
| 92d0a6a6 JR |
1629 | .P |
| 1630 | This output can be fed into the postprocessor | |
| 1631 | .BR grotty (@MAN1EXT@) | |
| 1632 | to get a formatted text document. | |
| 1633 | . | |
| 1634 | . | |
| 4d3e9548 | 1635 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1636 | Classical style output |
| 1637 | . | |
| 92d0a6a6 | 1638 | . |
| 465b256c | 1639 | .RS |
| 92d0a6a6 JR |
1640 | .P |
| 1641 | As a computer monitor has a very low resolution compared to modern | |
| 465b256c JR |
1642 | printers the |
| 1643 | .I intermediate output | |
| 1644 | for the X\~devices can use the jump-and-write command with its 2-digit | |
| 1645 | displacements. | |
| 1646 | . | |
| 92d0a6a6 JR |
1647 | . |
| 1648 | .P | |
| 4d3e9548 JL |
1649 | .EX |
| 1650 | \fBshell>\fP "hell world" | groff -Z -T X100 | |
| 1651 | .EE | |
| 92d0a6a6 | 1652 | . |
| 465b256c | 1653 | . |
| 92d0a6a6 JR |
1654 | .P |
| 1655 | .nf | |
| 1656 | .ft CB | |
| 1657 | x T X100 | |
| 1658 | x res 100 1 1 | |
| 1659 | x init | |
| 1660 | p1 | |
| 1661 | x font 5 TR | |
| 1662 | f5 | |
| 1663 | s10 | |
| 1664 | V16 | |
| 1665 | H100 | |
| 465b256c | 1666 | .I "# write text with old-style jump-and-write command" |
| 92d0a6a6 JR |
1667 | .ft CB |
| 1668 | ch07e07l03lw06w11o07r05l03dh7 | |
| 1669 | n16 0 | |
| 1670 | x trailer | |
| 1671 | V1100 | |
| 1672 | x stop | |
| 1673 | .ft P | |
| 1674 | .fi | |
| 1675 | .RE | |
| 1676 | . | |
| 465b256c | 1677 | . |
| 92d0a6a6 JR |
1678 | .P |
| 1679 | This output can be fed into the postprocessor | |
| 465b256c | 1680 | .BR \%xditview (1x) |
| 92d0a6a6 | 1681 | or |
| 465b256c | 1682 | .BR \%gxditview (@MAN1EXT@) |
| 92d0a6a6 JR |
1683 | for displaying in\~X. |
| 1684 | . | |
| 465b256c | 1685 | . |
| 92d0a6a6 JR |
1686 | .P |
| 1687 | Due to the obsolete jump-and-write command, the text clusters in the | |
| 1688 | classical output are almost unreadable. | |
| 1689 | . | |
| 1690 | . | |
| 1691 | .\" -------------------------------------------------------------------- | |
| 1692 | .SH "COMPATIBILITY" | |
| 1693 | .\" -------------------------------------------------------------------- | |
| 1694 | . | |
| 465b256c JR |
1695 | The |
| 1696 | .I intermediate output | |
| 1697 | language of the | |
| 92d0a6a6 JR |
1698 | .I classical troff |
| 1699 | was first documented in | |
| 465b256c | 1700 | .IR [CSTR\~#97] . |
| 92d0a6a6 JR |
1701 | . |
| 1702 | The | |
| 465b256c JR |
1703 | .I groff intermediate output |
| 1704 | format is compatible with this specification except for the following | |
| 1705 | features. | |
| 1706 | . | |
| 1707 | . | |
| 4d3e9548 | 1708 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1709 | The classical quasi device independence is not yet implemented. |
| 1710 | . | |
| 465b256c | 1711 | . |
| 4d3e9548 | 1712 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1713 | The old hardware was very different from what we use today. |
| 1714 | . | |
| 465b256c JR |
1715 | So the |
| 1716 | .I groff | |
| 1717 | devices are also fundamentally different from the ones in | |
| 1718 | .I classical | |
| 1719 | .IR troff . | |
| 92d0a6a6 JR |
1720 | . |
| 1721 | For example, the classical PostScript device was called | |
| 1722 | .I post | |
| 1723 | and had a resolution of 720 units per inch, | |
| 465b256c JR |
1724 | while |
| 1725 | .IR groff 's | |
| 92d0a6a6 JR |
1726 | .I ps |
| 1727 | device has a resolution of 72000 units per inch. | |
| 1728 | . | |
| 1729 | Maybe, by implementing some rescaling mechanism similar to the | |
| 1730 | classical quasi device independence, these could be integrated into | |
| 465b256c JR |
1731 | modern |
| 1732 | .IR groff . | |
| 1733 | . | |
| 92d0a6a6 | 1734 | . |
| 4d3e9548 | 1735 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1736 | The B-spline command |
| 1737 | .B D~ | |
| 465b256c JR |
1738 | is correctly handled by the |
| 1739 | .I intermediate output | |
| 1740 | parser, but the drawing routines aren't implemented in some of the | |
| 1741 | postprocessor programs. | |
| 1742 | . | |
| 1743 | . | |
| 4d3e9548 | 1744 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1745 | The argument of the commands |
| 1746 | .B s | |
| 1747 | and | |
| 1748 | .B x H | |
| 1749 | has the implicit unit scaled point\~\c | |
| 4d3e9548 | 1750 | .B z |
| 465b256c JR |
1751 | in |
| 1752 | .IR groff , | |
| 1753 | while | |
| 1754 | .I classical troff | |
| 1755 | had point (\c | |
| 4d3e9548 | 1756 | .BR p ). |
| 92d0a6a6 | 1757 | . |
| 465b256c JR |
1758 | This isn't an incompatibility, but a compatible extension, for both |
| 1759 | units coincide for all devices without a | |
| 92d0a6a6 | 1760 | .I sizescale |
| 465b256c JR |
1761 | parameter, including all classical and the |
| 1762 | .I groff | |
| 1763 | text devices. | |
| 92d0a6a6 | 1764 | . |
| 465b256c JR |
1765 | The few |
| 1766 | .I groff | |
| 1767 | devices with a sizescale parameter either did not exist, had a | |
| 1768 | different name, or seem to have had a different resolution. | |
| 92d0a6a6 JR |
1769 | . |
| 1770 | So conflicts with classical devices are very unlikely. | |
| 1771 | . | |
| 465b256c | 1772 | . |
| 4d3e9548 JL |
1773 | .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ |
| 1774 | .IP \[bu] 2m | |
| 92d0a6a6 JR |
1775 | The position changing after the commands |
| 1776 | .BR Dp , | |
| 1777 | .BR DP , | |
| 1778 | and | |
| 1779 | .B Dt | |
| 1780 | is illogical, but as old versions of groff used this feature it is | |
| 1781 | kept for compatibility reasons. | |
| 1782 | .\} \" @STUPID_DRAWING_POSITIONING | |
| 1783 | .el \{\ | |
| 4d3e9548 | 1784 | .IP \[bu] 2m |
| 92d0a6a6 JR |
1785 | Temporarily, there existed some confusion on the positioning after the |
| 1786 | .B D | |
| 465b256c JR |
1787 | commands that are |
| 1788 | .I groff | |
| 1789 | extensions. | |
| 92d0a6a6 JR |
1790 | . |
| 1791 | This has been clarified by establishing the classical rule for all | |
| 1792 | groff drawing commands: | |
| 1793 | . | |
| 465b256c | 1794 | . |
| 92d0a6a6 JR |
1795 | .RS |
| 1796 | .P | |
| 465b256c JR |
1797 | .ft I |
| 1798 | The position after a graphic object has been drawn is at its end; | |
| 1799 | for circles and ellipses, the "end" is at the right side. | |
| 1800 | .ft | |
| 92d0a6a6 JR |
1801 | .RE |
| 1802 | . | |
| 465b256c | 1803 | . |
| 92d0a6a6 JR |
1804 | .P |
| 1805 | From this, the positionings specified for the drawing commands above | |
| 1806 | follow quite naturally. | |
| 1807 | .\} \" @STUPID_DRAWING_POSITIONING | |
| 1808 | . | |
| 1809 | .P | |
| 465b256c JR |
1810 | The differences between |
| 1811 | .I groff | |
| 1812 | and | |
| 1813 | .I classical troff | |
| 1814 | are documented in | |
| 92d0a6a6 JR |
1815 | .BR groff_diff (@MAN7EXT@). |
| 1816 | . | |
| 1817 | . | |
| 1818 | .\" -------------------------------------------------------------------- | |
| 1819 | .SH "FILES" | |
| 1820 | .\" -------------------------------------------------------------------- | |
| 1821 | . | |
| 1822 | .TP | |
| 1823 | .BI @FONTDIR@/dev name /DESC | |
| 1824 | Device description file for device | |
| 1825 | .IR name . | |
| 1826 | . | |
| 1827 | .TP | |
| 4d3e9548 | 1828 | .IB \[la]groff-source-dir\[ra] /src/libs/libdriver/input.cpp |
| 465b256c JR |
1829 | Defines the parser and postprocessor for the |
| 1830 | .I intermediate | |
| 1831 | .IR output . | |
| 92d0a6a6 JR |
1832 | . |
| 1833 | It is located relative to the top directory of the | |
| 1834 | .I groff | |
| 4d3e9548 | 1835 | source tree. |
| 92d0a6a6 JR |
1836 | . |
| 1837 | This parser is the definitive specification of the | |
| 465b256c JR |
1838 | .I groff intermediate output |
| 1839 | format. | |
| 92d0a6a6 JR |
1840 | . |
| 1841 | . | |
| 1842 | .\" -------------------------------------------------------------------- | |
| 1843 | .SH "SEE ALSO" | |
| 1844 | .\" -------------------------------------------------------------------- | |
| 1845 | . | |
| 1846 | A reference like | |
| 1847 | .BR groff (@MAN7EXT@) | |
| 1848 | refers to a manual page; here | |
| 465b256c | 1849 | .B groff |
| 92d0a6a6 JR |
1850 | in section\~\c |
| 1851 | .I @MAN7EXT@ | |
| 1852 | of the man-page documentation system. | |
| 1853 | . | |
| 1854 | To read the example, look up section\~@MAN7EXT@ in your desktop help | |
| 1855 | system or call from the shell prompt | |
| 1856 | . | |
| 465b256c | 1857 | . |
| 92d0a6a6 JR |
1858 | .RS |
| 1859 | .P | |
| 4d3e9548 JL |
1860 | .EX |
| 1861 | \fBshell>\fP man @MAN7EXT@ groff | |
| 1862 | .EE | |
| 92d0a6a6 JR |
1863 | .RE |
| 1864 | . | |
| 465b256c | 1865 | . |
| 92d0a6a6 JR |
1866 | .P |
| 1867 | For more details, see | |
| 1868 | .BR man (1). | |
| 1869 | . | |
| 465b256c | 1870 | . |
| 92d0a6a6 JR |
1871 | .TP |
| 1872 | .BR groff (@MAN1EXT@) | |
| 1873 | option | |
| 1874 | .B -Z | |
| 1875 | and further readings on groff. | |
| 1876 | . | |
| 465b256c | 1877 | . |
| 92d0a6a6 JR |
1878 | .TP |
| 1879 | .BR groff (@MAN7EXT@) | |
| 1880 | for details of the | |
| 1881 | .I groff | |
| 1882 | language such as numerical units and escape sequences. | |
| 1883 | . | |
| 465b256c | 1884 | . |
| 92d0a6a6 JR |
1885 | .TP |
| 1886 | .BR groff_font (@MAN5EXT@) | |
| 1887 | for details on the device scaling parameters of the | |
| 1888 | .B DESC | |
| 1889 | file. | |
| 1890 | . | |
| 465b256c | 1891 | . |
| 92d0a6a6 | 1892 | .TP |
| 465b256c | 1893 | .BR @g@troff (@MAN1EXT@) |
| 92d0a6a6 JR |
1894 | generates the device-independent intermediate output. |
| 1895 | . | |
| 465b256c | 1896 | . |
| 92d0a6a6 JR |
1897 | .TP |
| 1898 | .BR roff (@MAN7EXT@) | |
| 1899 | for historical aspects and the general structure of roff systems. | |
| 1900 | . | |
| 465b256c | 1901 | . |
| 92d0a6a6 JR |
1902 | .TP |
| 1903 | .BR groff_diff (@MAN7EXT@) | |
| 1904 | The differences between the intermediate output in groff and classical | |
| 1905 | troff. | |
| 1906 | . | |
| 465b256c JR |
1907 | . |
| 1908 | .TP | |
| 1909 | .BR gxditview (@MAN1EXT@) | |
| 1910 | Viewer for the | |
| 1911 | .I intermediate | |
| 1912 | .IR output . | |
| 1913 | . | |
| 1914 | . | |
| 92d0a6a6 JR |
1915 | .P |
| 1916 | .BR \%grodvi (@MAN1EXT@), | |
| 1917 | .BR \%grohtml (@MAN1EXT@), | |
| 1918 | .BR \%grolbp (@MAN1EXT@), | |
| 1919 | .BR \%grolj4 (@MAN1EXT@), | |
| 1920 | .BR \%grops (@MAN1EXT@), | |
| 1921 | .BR \%grotty (@MAN1EXT@) | |
| 1922 | .br | |
| 1923 | .RS | |
| 1924 | the groff postprocessor programs. | |
| 1925 | .RE | |
| 1926 | . | |
| 465b256c | 1927 | . |
| 92d0a6a6 JR |
1928 | .P |
| 1929 | For a treatment of all aspects of the groff system within a single | |
| 1930 | document, see the | |
| 1931 | .I groff info | |
| 1932 | .IR file . | |
| 1933 | . | |
| 1934 | It can be read within the integrated help systems, within | |
| 1935 | .BR emacs (1) | |
| 1936 | or from the shell prompt by | |
| 1937 | . | |
| 1938 | .RS | |
| 4d3e9548 JL |
1939 | .EX |
| 1940 | \fBshell>\fP info groff | |
| 1941 | .EE | |
| 92d0a6a6 JR |
1942 | .RE |
| 1943 | . | |
| 465b256c | 1944 | . |
| 92d0a6a6 JR |
1945 | .P |
| 1946 | The | |
| 1947 | .I classical troff output language | |
| 1948 | is described in two AT&T Bell Labs CSTR documents available on-line at | |
| 4d3e9548 JL |
1949 | .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr.html |
| 1950 | Bell Labs CSTR site | |
| 1951 | .UE . | |
| 92d0a6a6 | 1952 | . |
| 465b256c | 1953 | . |
| 92d0a6a6 JR |
1954 | .TP |
| 1955 | .I [CSTR #97] | |
| 1956 | .I A Typesetter-independent TROFF | |
| 1957 | by | |
| 1958 | .I Brian Kernighan | |
| 4d3e9548 JL |
1959 | is the original and most comprehensive documentation on the output |
| 1960 | language; see | |
| 1961 | .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:97.ps.gz | |
| 1962 | CSTR\~#97 | |
| 1963 | .UE . | |
| 92d0a6a6 | 1964 | . |
| 465b256c | 1965 | . |
| 92d0a6a6 JR |
1966 | .TP |
| 1967 | .I [CSTR\~#54] | |
| 1968 | The 1992 revision of the | |
| 1969 | .I Nroff/\:Troff User's Manual | |
| 1970 | by | |
| 4d3e9548 | 1971 | .I J.\& F.\& Ossanna |
| 92d0a6a6 JR |
1972 | and |
| 1973 | .I Brian Kernighan | |
| 4d3e9548 | 1974 | isn't as comprehensive as |
| 92d0a6a6 | 1975 | .I [CSTR\~#97] |
| 465b256c | 1976 | regarding the output language; see |
| 4d3e9548 JL |
1977 | .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz |
| 1978 | CSTR\~#54 | |
| 1979 | .UE . | |
| 92d0a6a6 JR |
1980 | . |
| 1981 | . | |
| 1982 | .\" -------------------------------------------------------------------- | |
| 1983 | .SH "AUTHORS" | |
| 1984 | .\" -------------------------------------------------------------------- | |
| 1985 | . | |
| 4d3e9548 JL |
1986 | Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
| 1987 | Free Software Foundation, Inc. | |
| 465b256c JR |
1988 | . |
| 1989 | . | |
| 92d0a6a6 JR |
1990 | .P |
| 1991 | This document is distributed under the terms of the FDL (GNU Free | |
| 4d3e9548 | 1992 | Documentation License) version 1.3 or later. |
| 92d0a6a6 JR |
1993 | . |
| 1994 | You should have received a copy of the FDL with this package; it is also | |
| 1995 | available on-line at the | |
| 4d3e9548 JL |
1996 | .UR http://\:www.gnu.org/\:copyleft/\:fdl.html |
| 1997 | GNU copyleft site | |
| 1998 | .UE . | |
| 92d0a6a6 | 1999 | . |
| 465b256c | 2000 | . |
| 92d0a6a6 JR |
2001 | .P |
| 2002 | This document is part of | |
| 2003 | .IR groff , | |
| 465b256c JR |
2004 | the GNU |
| 2005 | .I roff | |
| 2006 | distribution. | |
| 92d0a6a6 JR |
2007 | . |
| 2008 | It is based on a former version \- published under the GPL \- that | |
| 2009 | described only parts of the | |
| 2010 | .I groff | |
| 2011 | extensions of the output language. | |
| 2012 | . | |
| 4d3e9548 | 2013 | It was rewritten in 2002 by Bernd Warken and is |
| 465b256c | 2014 | maintained by |
| 4d3e9548 JL |
2015 | .MT wl@gnu.org |
| 2016 | Werner Lemberg | |
| 2017 | .ME . | |
| 92d0a6a6 JR |
2018 | . |
| 2019 | .\" -------------------------------------------------------------------- | |
| 2020 | .\" Emacs settings | |
| 2021 | .\" -------------------------------------------------------------------- | |
| 2022 | .\" | |
| 2023 | .\" Local Variables: | |
| 2024 | .\" mode: nroff | |
| 2025 | .\" End: |