| Commit | Line | Data |
|---|---|---|
| 92d0a6a6 JR |
1 | '\" t |
| 2 | .ig | |
| 4d3e9548 | 3 | Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 |
| 465b256c | 4 | Free Software Foundation, Inc. |
| 92d0a6a6 JR |
5 | |
| 6 | Permission is granted to make and distribute verbatim copies of | |
| 7 | this manual provided the copyright notice and this permission notice | |
| 8 | are preserved on all copies. | |
| 9 | ||
| 10 | Permission is granted to copy and distribute modified versions of this | |
| 11 | manual under the conditions for verbatim copying, provided that the | |
| 12 | entire resulting derived work is distributed under the terms of a | |
| 13 | permission notice identical to this one. | |
| 14 | ||
| 15 | Permission is granted to copy and distribute translations of this | |
| 16 | manual into another language, under the above conditions for modified | |
| 17 | versions, except that this permission notice may be included in | |
| 18 | translations approved by the Free Software Foundation instead of in | |
| 19 | the original English. | |
| 20 | .. | |
| 21 | . | |
| 22 | .do nr groff_ms_C \n[.C] | |
| 23 | .cp 0 | |
| 24 | . | |
| 25 | .TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" | |
| 465b256c JR |
26 | . |
| 27 | . | |
| 28 | . | |
| 92d0a6a6 | 29 | .SH NAME |
| 465b256c | 30 | . |
| 92d0a6a6 | 31 | groff_ms \- groff ms macros |
| 465b256c JR |
32 | . |
| 33 | . | |
| 34 | . | |
| 92d0a6a6 | 35 | .SH SYNOPSIS |
| 465b256c | 36 | . |
| 92d0a6a6 JR |
37 | .B groff |
| 38 | .B \-ms | |
| 39 | [ | |
| 40 | .IR options .\|.\|.\& | |
| 41 | ] | |
| 42 | [ | |
| 43 | .IR files .\|.\|.\& | |
| 44 | ] | |
| 45 | .br | |
| 46 | .B groff | |
| 47 | .B \-m\ ms | |
| 48 | [ | |
| 49 | .IR options .\|.\|.\& | |
| 50 | ] | |
| 51 | [ | |
| 52 | .IR files .\|.\|.\& | |
| 53 | ] | |
| 465b256c JR |
54 | . |
| 55 | . | |
| 56 | . | |
| 92d0a6a6 | 57 | .SH DESCRIPTION |
| 465b256c | 58 | . |
| 92d0a6a6 JR |
59 | This manual page describes the GNU version of the |
| 60 | .I ms | |
| 61 | macros, | |
| 62 | part of the | |
| 63 | .I groff | |
| 64 | typesetting system. | |
| 65 | The | |
| 66 | .I ms | |
| 67 | macros are mostly compatible with the | |
| 68 | documented behavior of the 4.3 | |
| 69 | .SM BSD | |
| 70 | Unix | |
| 71 | .I ms | |
| 72 | macros (see | |
| 73 | .I Differences from troff ms | |
| 74 | below for details). | |
| 75 | The | |
| 76 | .I ms | |
| 77 | macros are suitable for reports, letters, books, and | |
| 78 | technical documentation. | |
| 465b256c JR |
79 | . |
| 80 | . | |
| 81 | . | |
| 92d0a6a6 | 82 | .SH USAGE |
| 465b256c | 83 | . |
| 92d0a6a6 JR |
84 | The |
| 85 | .I ms | |
| 86 | macro package expects files to have | |
| 87 | a certain amount of structure. | |
| 88 | The simplest documents can begin with a paragraph macro | |
| 89 | and consist of text separated by paragraph macros | |
| 90 | or even blank lines. | |
| 91 | Longer documents have a structure as follows: | |
| 465b256c | 92 | . |
| 92d0a6a6 JR |
93 | .TP |
| 94 | .B "Document type" | |
| 95 | If you use the | |
| 96 | .B RP | |
| 97 | (report) macro at the beginning of the document, | |
| 98 | .I groff | |
| 99 | prints the cover page information on its own page; | |
| 100 | otherwise it prints the information on the | |
| 101 | first page with your document text immediately following. | |
| 102 | Other document formats found in AT&T | |
| 103 | .I troff | |
| 104 | are specific to AT&T | |
| 105 | or Berkeley, and are not supported in | |
| 106 | .IR "groff ms" . | |
| 465b256c | 107 | . |
| 92d0a6a6 JR |
108 | .TP |
| 109 | .B "Format and layout" | |
| 110 | By setting number registers, | |
| 111 | you can change your document's type (font and size), | |
| 112 | margins, spacing, headers and footers, and footnotes. | |
| 113 | See | |
| 114 | .I "Document control registers" | |
| 115 | below for more details. | |
| 465b256c | 116 | . |
| 92d0a6a6 JR |
117 | .TP |
| 118 | .B "Cover page" | |
| 119 | A cover page consists of a title, | |
| 120 | and optionally the author's name and institution, | |
| 121 | an abstract, and the date. | |
| 122 | See | |
| 123 | .I "Cover page macros" | |
| 124 | below for more details. | |
| 465b256c | 125 | . |
| 92d0a6a6 JR |
126 | .TP |
| 127 | .B "Body" | |
| 128 | Following the cover page is your document. | |
| 129 | It consists of paragraphs, headings, and lists. | |
| 465b256c | 130 | . |
| 92d0a6a6 JR |
131 | .TP |
| 132 | .B "Table of contents" | |
| 133 | Longer documents usually include a table of contents, | |
| 134 | which you can add by placing the | |
| 135 | .B TC | |
| 136 | macro at the end of your document. | |
| 465b256c JR |
137 | . |
| 138 | . | |
| 92d0a6a6 | 139 | .SS "Document control registers" |
| 465b256c | 140 | . |
| 92d0a6a6 JR |
141 | The following table lists the document control |
| 142 | number registers. | |
| 143 | For the sake of consistency, | |
| 144 | set registers related to margins at the beginning of your document, | |
| 145 | or just after the | |
| 146 | .B RP | |
| 147 | macro. | |
| 465b256c | 148 | . |
| 92d0a6a6 | 149 | .LP |
| 465b256c | 150 | .ne 12 |
| 92d0a6a6 JR |
151 | .B Margin settings |
| 152 | .RS | |
| 153 | .na | |
| 154 | .TS | |
| 4d3e9548 JL |
155 | cb cb cb cb |
| 156 | lfCW l l l. | |
| 92d0a6a6 JR |
157 | Reg. Definition Effective Default |
| 158 | _ | |
| 4d3e9548 JL |
159 | PO Page offset (left margin) next page 1i |
| 160 | LL Line length next paragraph 6i | |
| 161 | LT Header/footer length next paragraph 6i | |
| 162 | HM Top (header) margin next page 1i | |
| 163 | FM Bottom (footer) margin next page 1i | |
| 92d0a6a6 JR |
164 | _ |
| 165 | .TE | |
| 166 | .RE | |
| 465b256c | 167 | . |
| 92d0a6a6 | 168 | .LP |
| 465b256c | 169 | .ne 12 |
| 92d0a6a6 JR |
170 | .B Text settings |
| 171 | .RS | |
| 172 | .TS | |
| 4d3e9548 JL |
173 | cb cb cb cb |
| 174 | lfCW lx l l. | |
| 92d0a6a6 JR |
175 | Reg. Definition Effective Default |
| 176 | _ | |
| 177 | PS T{ | |
| 178 | Point size | |
| 4d3e9548 | 179 | T} next paragraph 10p |
| 92d0a6a6 JR |
180 | VS T{ |
| 181 | Line spacing (leading) | |
| 4d3e9548 | 182 | T} next paragraph 12p |
| 465b256c JR |
183 | PSINCR T{ |
| 184 | Point size increment | |
| 185 | for section headings of | |
| 186 | increasing importance | |
| 187 | T} next heading 1p | |
| 188 | GROWPS T{ | |
| 189 | Heading level | |
| 190 | beyond which PSINCR | |
| 191 | is ignored | |
| 192 | T} next heading 0 | |
| 92d0a6a6 JR |
193 | _ |
| 194 | .TE | |
| 195 | .RE | |
| 465b256c | 196 | . |
| 92d0a6a6 | 197 | .LP |
| 465b256c | 198 | .ne 11 |
| 92d0a6a6 JR |
199 | .B Paragraph settings |
| 200 | .RS | |
| 201 | .TS | |
| 4d3e9548 JL |
202 | cb cb cb cb |
| 203 | lfCW lx l l. | |
| 92d0a6a6 JR |
204 | Reg. Definition Effective Default |
| 205 | _ | |
| 206 | PI T{ | |
| 207 | Initial indent | |
| 4d3e9548 | 208 | T} next paragraph 5n |
| 92d0a6a6 JR |
209 | PD T{ |
| 210 | Space between paragraphs | |
| 4d3e9548 | 211 | T} next paragraph 0.3v |
| 92d0a6a6 JR |
212 | QI T{ |
| 213 | Quoted paragraph indent | |
| 4d3e9548 | 214 | T} next paragraph 5n |
| 465b256c JR |
215 | PORPHANS T{ |
| 216 | Number of initial lines | |
| 217 | to be kept together | |
| 4d3e9548 | 218 | T} next paragraph 1 |
| 465b256c JR |
219 | HORPHANS T{ |
| 220 | Number of initial lines | |
| 221 | to be kept with heading | |
| 222 | T} next heading 1 | |
| 92d0a6a6 JR |
223 | _ |
| 224 | .TE | |
| 225 | .RE | |
| 465b256c | 226 | . |
| 92d0a6a6 JR |
227 | .LP |
| 228 | .ne 7 | |
| 229 | .B Footnote settings | |
| 230 | .RS | |
| 231 | .TS | |
| 4d3e9548 JL |
232 | cb cb cb cb |
| 233 | lfCW l l l. | |
| 92d0a6a6 JR |
234 | Reg. Definition Effective Default |
| 235 | _ | |
| 236 | FL Footnote length next footnote \[rs]n[LL]*5/6 | |
| 237 | FI Footnote indent next footnote 2n | |
| 238 | FF Footnote format next footnote 0 | |
| 239 | FPS Point size next footnote \[rs]n[PS]-2 | |
| 240 | FVS Vert. spacing next footnote \[rs]n[FPS]+2 | |
| 241 | FPD Para. spacing next footnote \[rs]n[PD]/2 | |
| 242 | _ | |
| 243 | .TE | |
| 244 | .RE | |
| 465b256c | 245 | . |
| 92d0a6a6 JR |
246 | .LP |
| 247 | .ne 6 | |
| 248 | .B Other settings | |
| 249 | .RS | |
| 250 | .TS | |
| 4d3e9548 JL |
251 | cb cb cb cb |
| 252 | lfCW l l l. | |
| 92d0a6a6 JR |
253 | Reg. Definition Effective Default |
| 254 | _ | |
| 4d3e9548 | 255 | MINGW Minimum width between columns next page 2n |
| 92d0a6a6 JR |
256 | _ |
| 257 | .TE | |
| 258 | .ad | |
| 259 | .RE | |
| 465b256c JR |
260 | . |
| 261 | . | |
| 92d0a6a6 | 262 | .SS "Cover page macros" |
| 465b256c | 263 | . |
| 92d0a6a6 JR |
264 | Use the following macros to create a cover page for your document |
| 265 | in the order shown. | |
| 465b256c | 266 | . |
| 92d0a6a6 | 267 | .TP |
| 465b256c | 268 | .B .RP [no] |
| 92d0a6a6 JR |
269 | Specifies the report format for your document. |
| 270 | The report format creates a separate cover page. | |
| 271 | With no | |
| 272 | .B RP | |
| 273 | macro, | |
| 274 | .I groff | |
| 275 | prints a subset of the | |
| 276 | cover page on page\~1 of your document. | |
| 465b256c | 277 | . |
| 92d0a6a6 JR |
278 | .IP |
| 279 | If you use the optional | |
| 280 | .B no | |
| 281 | argument, | |
| 282 | .I groff | |
| 283 | prints a title page but | |
| 284 | does not repeat any of the title page information | |
| 285 | (title, author, abstract, etc.\&) | |
| 286 | on page\~1 of the document. | |
| 465b256c | 287 | . |
| 92d0a6a6 | 288 | .TP |
| 465b256c | 289 | .B .P1 |
| 92d0a6a6 JR |
290 | (P-one) Prints the header on page\~1. |
| 291 | The default is to suppress the header. | |
| 465b256c | 292 | . |
| 92d0a6a6 | 293 | .TP |
| 465b256c | 294 | .BI ".DA [" xxx ] |
| 92d0a6a6 JR |
295 | (optional) Print the current date, |
| 296 | or the arguments to the macro if any, | |
| 297 | on the title page (if specified) | |
| 298 | and in the footers. | |
| 299 | This is the default for | |
| 300 | .IR nroff . | |
| 465b256c | 301 | . |
| 92d0a6a6 | 302 | .TP |
| 465b256c | 303 | .BI ".ND [" xxx ] |
| 92d0a6a6 JR |
304 | (optional) Print the current date, |
| 305 | or the arguments to the macro if any, | |
| 306 | on the title page (if specified) | |
| 307 | but not in the footers. | |
| 308 | This is the default for | |
| 309 | .IR troff . | |
| 465b256c | 310 | . |
| 92d0a6a6 | 311 | .TP |
| 465b256c | 312 | .B .TL |
| 92d0a6a6 JR |
313 | Specifies the document title. |
| 314 | .I Groff | |
| 315 | collects text following the | |
| 316 | .B TL | |
| 317 | macro into the title, until reaching the author name or abstract. | |
| 465b256c | 318 | . |
| 92d0a6a6 | 319 | .TP |
| 465b256c | 320 | .B .AU |
| 92d0a6a6 JR |
321 | Specifies the author's name. |
| 322 | You can specify multiple authors by using an | |
| 323 | .B AU | |
| 324 | macro for each author. | |
| 465b256c | 325 | . |
| 92d0a6a6 | 326 | .TP |
| 465b256c | 327 | .B .AI |
| 92d0a6a6 JR |
328 | Specifies the author's institution. |
| 329 | You can specify multiple institutions. | |
| 465b256c | 330 | . |
| 92d0a6a6 | 331 | .TP |
| 465b256c | 332 | .B .AB [no] |
| 92d0a6a6 JR |
333 | Begins the abstract. |
| 334 | The default is to print the word | |
| 335 | .BR ABSTRACT , | |
| 336 | centered and in italics, above the text of the abstract. | |
| 337 | The option | |
| 338 | .B no | |
| 339 | suppresses this heading. | |
| 465b256c | 340 | . |
| 92d0a6a6 | 341 | .TP |
| 465b256c | 342 | .B .AE |
| 92d0a6a6 | 343 | End the abstract. |
| 465b256c JR |
344 | . |
| 345 | . | |
| 92d0a6a6 | 346 | .SS Paragraphs |
| 465b256c | 347 | . |
| 92d0a6a6 JR |
348 | Use the |
| 349 | .B PP | |
| 350 | macro to create indented paragraphs, | |
| 351 | and the | |
| 352 | .B LP | |
| 353 | macro to create paragraphs with no initial indent. | |
| 465b256c | 354 | . |
| 92d0a6a6 JR |
355 | .PP |
| 356 | The | |
| 357 | .B QP | |
| 358 | macro indents all text at both left and right margins. | |
| 359 | The effect is identical to the HTML | |
| 360 | .B <BLOCKQUOTE> | |
| 361 | element. | |
| 362 | The next paragraph or heading | |
| 363 | returns margins to normal. | |
| 465b256c | 364 | . |
| 92d0a6a6 JR |
365 | .PP |
| 366 | The | |
| 367 | .B XP | |
| 368 | macro produces an exdented paragraph. | |
| 369 | The first line of the paragraph begins at | |
| 370 | the left margin, | |
| 371 | and subsequent lines are indented | |
| 372 | (the opposite of | |
| 373 | .BR PP ). | |
| 465b256c JR |
374 | . |
| 375 | .PP | |
| 376 | For each of the above paragraph types, | |
| 377 | and also for any list entry introduced by the | |
| 378 | .B IP | |
| 379 | macro | |
| 380 | (described later), | |
| 381 | the document control register | |
| 382 | .BR PORPHANS , | |
| 383 | sets the | |
| 384 | .I minimum | |
| 385 | number of lines which must be printed, | |
| 386 | after the start of the paragraph, | |
| 387 | and before any page break occurs. | |
| 388 | If there is insufficient space remaining on the current page | |
| 389 | to accommodate this number of lines, | |
| 390 | then a page break is forced | |
| 391 | .I before | |
| 392 | the first line of the paragraph is printed. | |
| 393 | . | |
| 394 | .PP | |
| 395 | Similarly, | |
| 396 | when a section heading | |
| 397 | (see subsection | |
| 398 | .I Headings | |
| 399 | below) | |
| 400 | preceeds any of these paragraph types, | |
| 401 | the | |
| 402 | .B HORPHANS | |
| 403 | document control register specifies the | |
| 404 | .I minimum | |
| 405 | number of lines of the paragraph | |
| 406 | which must be kept on the same page as the heading. | |
| 407 | If insufficient space remains on the current page | |
| 408 | to accommodate the heading and this number of lines of paragraph text, | |
| 409 | then a page break is forced | |
| 410 | .I before | |
| 411 | the heading is printed. | |
| 412 | . | |
| 413 | . | |
| 92d0a6a6 | 414 | .SS Headings |
| 465b256c | 415 | . |
| 92d0a6a6 JR |
416 | Use headings to create a hierarchical structure |
| 417 | for your document. | |
| 465b256c JR |
418 | By default, |
| 419 | the | |
| 92d0a6a6 JR |
420 | .I ms |
| 421 | macros print headings in | |
| 422 | .B bold | |
| 423 | using the same font family and point size as the body text. | |
| 465b256c JR |
424 | For output devices which support scalable fonts, |
| 425 | this behaviour may be modified, | |
| 426 | by defining the document control registers, | |
| 427 | .B GROWPS | |
| 428 | and | |
| 429 | .BR PSINCR . | |
| 430 | . | |
| 92d0a6a6 JR |
431 | .PP |
| 432 | The following heading macros are available: | |
| 465b256c | 433 | . |
| 92d0a6a6 | 434 | .TP |
| 465b256c | 435 | .BI .NH\ xx |
| 92d0a6a6 JR |
436 | Numbered heading. |
| 437 | The argument | |
| 438 | .I xx | |
| 439 | is either a numeric argument to indicate the | |
| 440 | level of the heading, or | |
| 441 | .I S\ xx\ xx\ \c | |
| 442 | ".\|.\|." | |
| 443 | to set the section number explicitly. | |
| 444 | If you specify heading levels out of sequence, | |
| 445 | such as invoking | |
| 446 | .B ".NH\ 3" | |
| 447 | after | |
| 448 | .BR ".NH\ 1" , | |
| 449 | .I groff | |
| 450 | prints a warning on standard error. | |
| 465b256c JR |
451 | . |
| 452 | .IP | |
| 453 | If the | |
| 454 | .B GROWPS | |
| 455 | register is set to a value | |
| 456 | greater than the level of the heading, | |
| 457 | then the point size of the heading will be increased by | |
| 458 | .B PSINCR | |
| 459 | units over the text size specified by the | |
| 460 | .B PS | |
| 461 | register, | |
| 462 | for each level by which the heading level is less than | |
| 463 | the value of | |
| 464 | .BR GROWPS . | |
| 465 | For example, | |
| 466 | the sequence: | |
| 467 | . | |
| 468 | .RS | |
| 469 | .ne 12 | |
| 470 | .nf | |
| 471 | .IP | |
| 472 | \&.nr PS 10 | |
| 473 | \&.nr GROWPS 3 | |
| 474 | \&.nr PSINCR 1.5p | |
| 475 | \&. | |
| 476 | \&.NH 1 | |
| 477 | Top Level Heading | |
| 478 | \&. | |
| 479 | \&.NH 2 | |
| 480 | Second Level Heading | |
| 481 | \&. | |
| 482 | \&.NH 3 | |
| 483 | Third Level Heading | |
| 484 | .fi | |
| 485 | .RE | |
| 486 | . | |
| 487 | .IP | |
| 488 | will cause | |
| 489 | .RI \*(lq 1.\ Top\ Level\ Heading \*(rq | |
| 490 | to be printed in 13pt | |
| 491 | .B bold | |
| 492 | text, followed by | |
| 493 | .RI \*(lq 1.1.\ Second\ Level\ Heading \*(rq | |
| 494 | in 11.5pt | |
| 495 | .B bold | |
| 496 | text, while | |
| 497 | .RI \*(lq 1.1.1.\ Third\ Level\ Heading \*(rq, | |
| 498 | and all more deeply nested heading levels, | |
| 499 | will remain in the 10pt | |
| 500 | .B bold | |
| 501 | text which is specified by the | |
| 502 | .B PS | |
| 503 | register. | |
| 504 | . | |
| 505 | .IP | |
| 506 | Note that the value stored in | |
| 507 | .B PSINCR | |
| 508 | is interpreted in | |
| 509 | .I groff | |
| 510 | basic units; | |
| 511 | the | |
| 512 | .I p | |
| 513 | scaling factor should be employed, | |
| 514 | when assigning a value specified in points. | |
| 515 | . | |
| 516 | .IP | |
| 4d3e9548 JL |
517 | The style used to represent the section number, |
| 518 | within a numbered heading, | |
| 519 | is controlled by the | |
| 520 | .B SN-STYLE | |
| 521 | string; | |
| 522 | this may be set to either the | |
| 523 | .B SN-DOT | |
| 524 | or the | |
| 525 | .B SN-NO-DOT | |
| 526 | style, | |
| 527 | (described below), | |
| 528 | by aliasing | |
| 529 | .B SN-STYLE | |
| 530 | accordingly. | |
| 531 | By default, | |
| 532 | .B SN-STYLE | |
| 533 | is initialised by defining the alias | |
| 534 | .RS | |
| 535 | .nf | |
| 536 | .IP | |
| 537 | \&.als SN-STYLE SN-DOT | |
| 538 | .fi | |
| 539 | .RE | |
| 540 | .IP | |
| 541 | it may be changed to the | |
| 542 | .B SN-NO-DOT | |
| 543 | style, | |
| 544 | if preferred, | |
| 545 | by defining the alternative alias | |
| 546 | .RS | |
| 547 | .nf | |
| 548 | .IP | |
| 549 | \&.als SN-STYLE SN-NO-DOT | |
| 550 | .fi | |
| 551 | .RE | |
| 552 | .IP | |
| 553 | Any such change becomes effective with the first use of | |
| 554 | .BR .NH , | |
| 555 | .I after | |
| 556 | the new alias is defined. | |
| 557 | . | |
| 558 | .IP | |
| 465b256c JR |
559 | After invoking |
| 560 | .BR .NH , | |
| 561 | the assigned heading number is available in the strings | |
| 562 | .B SN-DOT | |
| 4d3e9548 JL |
563 | (as it appears in the default formatting style for numbered headings, |
| 564 | with a terminating period following the number), | |
| 465b256c JR |
565 | and |
| 566 | .B SN-NO-DOT | |
| 4d3e9548 | 567 | (with this terminating period omitted). |
| 465b256c JR |
568 | The string |
| 569 | .B SN | |
| 570 | is also defined, | |
| 571 | as an alias for | |
| 572 | .BR SN-DOT ; | |
| 573 | if preferred, | |
| 574 | the user may redefine it as an alias for | |
| 575 | .BR SN-NO-DOT , | |
| 576 | 'ne 10 | |
| 577 | by including the initialisation: | |
| 578 | . | |
| 579 | .RS | |
| 580 | .nf | |
| 581 | .IP | |
| 465b256c JR |
582 | \&.als SN SN-NO-DOT |
| 583 | .fi | |
| 584 | .RE | |
| 585 | . | |
| 586 | .IP | |
| 4d3e9548 JL |
587 | at any time; |
| 588 | the change becomes effective with the next use of | |
| 465b256c | 589 | .BR .NH , |
| 465b256c | 590 | .I after |
| 4d3e9548 | 591 | the new alias is defined. |
| 465b256c | 592 | . |
| 92d0a6a6 | 593 | .TP |
| 465b256c | 594 | .BI .SH\ [ xx ] |
| 92d0a6a6 | 595 | Unnumbered subheading. |
| 465b256c JR |
596 | The use of the optional |
| 597 | .I xx | |
| 598 | argument is a GNU extension, | |
| 599 | which adjusts the point size of the unnumbered subheading | |
| 600 | to match that of a numbered heading, | |
| 601 | introduced using | |
| 602 | .BI .NH\ xx | |
| 603 | with the same value of | |
| 604 | .IR xx . | |
| 605 | For example, | |
| 606 | given the same settings for | |
| 607 | .BR PS , | |
| 608 | .B GROWPS | |
| 609 | and | |
| 610 | .BR PSINCR , | |
| 611 | as used in the preceeding | |
| 612 | .B .NH | |
| 613 | example, | |
| 614 | the sequence: | |
| 615 | . | |
| 616 | .RS | |
| 617 | .ne | |
| 618 | .nf | |
| 619 | .IP | |
| 620 | \&.SH 2 | |
| 621 | An Unnumbered Subheading | |
| 622 | .fi | |
| 623 | .RE | |
| 624 | . | |
| 625 | .IP | |
| 626 | will print | |
| 627 | .RI \*(lq "An Unnumbered Subheading" \*(rq | |
| 628 | in 11.5pt | |
| 629 | .B bold | |
| 630 | text. | |
| 631 | . | |
| 632 | . | |
| 92d0a6a6 | 633 | .SS Highlighting |
| 465b256c | 634 | . |
| 92d0a6a6 JR |
635 | The |
| 636 | .I ms | |
| 637 | macros provide a variety of methods to highlight | |
| 638 | or emphasize text: | |
| 465b256c | 639 | . |
| 92d0a6a6 | 640 | .TP |
| 465b256c | 641 | .B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" |
| 92d0a6a6 JR |
642 | Sets its first argument in |
| 643 | .BR "bold type" . | |
| 644 | If you specify a second argument, | |
| 645 | .I groff | |
| 646 | prints it in the previous font after | |
| 647 | the bold text, with no intervening space | |
| 648 | (this allows you to set punctuation after | |
| 649 | the highlighted text without highlighting | |
| 650 | the punctuation). | |
| 651 | Similarly, it prints the third argument (if any) | |
| 652 | in the previous font | |
| 653 | .B before | |
| 654 | the first argument. | |
| 655 | For example, | |
| 656 | .RS | |
| 465b256c | 657 | . |
| 92d0a6a6 JR |
658 | .IP |
| 659 | \&.B foo ) ( | |
| 660 | .RE | |
| 465b256c | 661 | . |
| 92d0a6a6 JR |
662 | .IP |
| 663 | prints | |
| 664 | .RB ( foo ). | |
| 465b256c | 665 | . |
| 92d0a6a6 JR |
666 | .IP |
| 667 | If you give this macro no arguments, | |
| 668 | .I groff | |
| 669 | prints all text following in bold until | |
| 670 | the next highlighting, paragraph, or heading macro. | |
| 465b256c | 671 | . |
| 92d0a6a6 | 672 | .TP |
| 465b256c | 673 | .B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" |
| 92d0a6a6 JR |
674 | Sets its first argument in |
| 675 | roman (or regular) type. | |
| 676 | It operates similarly to the | |
| 677 | .B B | |
| 678 | macro otherwise. | |
| 465b256c | 679 | . |
| 92d0a6a6 | 680 | .TP |
| 465b256c | 681 | .B ".I [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" |
| 92d0a6a6 JR |
682 | Sets its first argument in |
| 683 | .IR "italic type" . | |
| 684 | It operates similarly to the | |
| 685 | .B B | |
| 686 | macro otherwise. | |
| 465b256c | 687 | . |
| 92d0a6a6 | 688 | .TP |
| 465b256c | 689 | .B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" |
| 92d0a6a6 JR |
690 | Sets its first argument in a constant width face. |
| 691 | It operates similarly to the | |
| 692 | .B B | |
| 693 | macro otherwise. | |
| 465b256c | 694 | . |
| 92d0a6a6 | 695 | .TP |
| 465b256c | 696 | .B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" |
| 92d0a6a6 JR |
697 | Sets its first argument in bold italic type. |
| 698 | It operates similarly to the | |
| 699 | .B B | |
| 700 | macro otherwise. | |
| 465b256c | 701 | . |
| 92d0a6a6 | 702 | .TP |
| 465b256c | 703 | .BI ".BX [" txt ] |
| 92d0a6a6 JR |
704 | Prints its argument and draws a box around it. |
| 705 | If you want to box a string that contains spaces, | |
| 706 | use a digit-width space (\[rs]0). | |
| 465b256c | 707 | . |
| 92d0a6a6 | 708 | .TP |
| 465b256c | 709 | .BI ".UL [" txt " [" post ]] |
| 92d0a6a6 JR |
710 | Prints its first argument with an underline. |
| 711 | If you specify a second argument, | |
| 712 | .I groff | |
| 713 | prints it in the previous font after | |
| 714 | the underlined text, with no intervening space. | |
| 465b256c | 715 | . |
| 92d0a6a6 | 716 | .TP |
| 465b256c | 717 | .B .LG |
| 92d0a6a6 JR |
718 | Prints all text following in larger type |
| 719 | (2\~points larger than the current point size) until | |
| 720 | the next font size, highlighting, paragraph, or heading macro. | |
| 721 | You can specify this macro multiple times | |
| 722 | to enlarge the point size as needed. | |
| 465b256c | 723 | . |
| 92d0a6a6 | 724 | .TP |
| 465b256c | 725 | .B .SM |
| 92d0a6a6 JR |
726 | Prints all text following in |
| 727 | smaller type | |
| 728 | (2\~points smaller than the current point size) until | |
| 729 | the next type size, highlighting, paragraph, or heading macro. | |
| 730 | You can specify this macro multiple times | |
| 731 | to reduce the point size as needed. | |
| 465b256c | 732 | . |
| 92d0a6a6 | 733 | .TP |
| 465b256c | 734 | .B .NL |
| 92d0a6a6 JR |
735 | Prints all text following in |
| 736 | the normal point size | |
| 737 | (that is, the value of the | |
| 738 | .B PS | |
| 739 | register). | |
| 465b256c | 740 | . |
| 92d0a6a6 JR |
741 | .TP |
| 742 | .BI \[rs]*{ text \[rs]*} | |
| 743 | Print the enclosed | |
| 744 | .I text | |
| 745 | as a superscript. | |
| 465b256c JR |
746 | . |
| 747 | . | |
| 92d0a6a6 | 748 | .SS Indents |
| 465b256c | 749 | . |
| 92d0a6a6 JR |
750 | You may need to indent sections of text. |
| 751 | A typical use for indents is to create nested lists and sublists. | |
| 465b256c | 752 | . |
| 92d0a6a6 JR |
753 | .PP |
| 754 | Use the | |
| 755 | .B RS | |
| 756 | and | |
| 757 | .B RE | |
| 758 | macros to start and end a section of indented text, respectively. | |
| 759 | The | |
| 760 | .B PI | |
| 761 | register controls the amount of indent. | |
| 465b256c | 762 | . |
| 92d0a6a6 JR |
763 | .PP |
| 764 | You can nest indented sections as deeply as needed by | |
| 765 | using multiple, nested pairs of | |
| 766 | .B RS | |
| 767 | and | |
| 768 | .BR RE . | |
| 465b256c JR |
769 | . |
| 770 | . | |
| 92d0a6a6 | 771 | .SS Lists |
| 465b256c | 772 | . |
| 92d0a6a6 JR |
773 | The |
| 774 | .B IP | |
| 775 | macro handles duties for all lists. | |
| 776 | Its syntax is as follows: | |
| 465b256c | 777 | . |
| 92d0a6a6 JR |
778 | .TP |
| 779 | .BI ".IP [" marker " [" width ]] | |
| 465b256c | 780 | . |
| 92d0a6a6 JR |
781 | .IP |
| 782 | The | |
| 783 | .I marker | |
| 784 | is usually a bullet character | |
| 785 | .B \[rs](bu | |
| 786 | for unordered lists, | |
| 787 | a number (or auto-incrementing number register) for numbered lists, | |
| 788 | or a word or phrase for indented (glossary-style) lists. | |
| 465b256c | 789 | . |
| 92d0a6a6 JR |
790 | .IP |
| 791 | The | |
| 792 | .I width | |
| 793 | specifies the indent for the body of each list item. | |
| 794 | Once specified, the indent remains the same for all | |
| 795 | list items in the document until specified again. | |
| 796 | .\" ----- | |
| 797 | .br | |
| 798 | .ne 15 | |
| 465b256c JR |
799 | . |
| 800 | . | |
| 92d0a6a6 | 801 | .SS "Tab stops" |
| 465b256c | 802 | . |
| 92d0a6a6 JR |
803 | Use the |
| 804 | .B ta | |
| 805 | request to set tab stops as needed. | |
| 806 | Use the | |
| 807 | .B TA | |
| 808 | macro to reset tabs to the default (every 5n). | |
| 809 | You can redefine the | |
| 810 | .B TA | |
| 811 | macro to create a different set of default tab stops. | |
| 465b256c JR |
812 | . |
| 813 | . | |
| 92d0a6a6 | 814 | .SS "Displays and keeps" |
| 465b256c | 815 | . |
| 92d0a6a6 JR |
816 | Use displays to show text-based examples or figures |
| 817 | (such as code listings). | |
| 818 | Displays turn off filling, so lines of code can be | |
| 819 | displayed as-is without inserting | |
| 820 | .B br | |
| 821 | requests in between each line. | |
| 822 | Displays can be | |
| 823 | .I kept | |
| 824 | on a single page, or allowed to break across pages. | |
| 825 | The following table shows the display types available. | |
| 826 | .RS | |
| 827 | .ne 11 | |
| 828 | .na | |
| 829 | .TS | |
| 4d3e9548 JL |
830 | cb s cbt |
| 831 | cb cb ^ | |
| 832 | lfCW lfCW lx. | |
| 92d0a6a6 JR |
833 | Display macro Type of display |
| 834 | With keep No keep | |
| 835 | _ | |
| 836 | \&.DS L \&.LD Left-justified. | |
| 837 | \&.DS I [\fIindent\fP] \&.ID T{ | |
| 838 | Indented (default indent in the \fBDI\fP register). | |
| 839 | T} | |
| 840 | \&.DS B \&.BD T{ | |
| 841 | Block-centered (left-justified, longest line centered). | |
| 842 | T} | |
| 843 | \&.DS C \&.CD Centered. | |
| 844 | \&.DS R \&.RD Right-justified. | |
| 845 | _ | |
| 846 | .TE | |
| 847 | .RE | |
| 848 | .ad | |
| 465b256c | 849 | . |
| 92d0a6a6 JR |
850 | .LP |
| 851 | Use the | |
| 852 | .B DE | |
| 853 | macro to end any display type. | |
| 854 | The macros | |
| 855 | .B Ds | |
| 856 | and | |
| 857 | .B De | |
| 465b256c | 858 | were formerly provided as aliases for |
| 92d0a6a6 JR |
859 | .B DS |
| 860 | and | |
| 861 | .BR DE , | |
| 465b256c JR |
862 | respectively, but they have been removed, and should no longer be used. |
| 863 | X11 documents which actually use | |
| 864 | .B Ds | |
| 865 | and | |
| 866 | .B De | |
| 867 | always load a specific macro file from the X11 distribution (macros.t) | |
| 868 | which provides proper definitions for the two macros. | |
| 92d0a6a6 JR |
869 | .PP |
| 870 | To | |
| 871 | .I keep | |
| 872 | text together on a page, | |
| 873 | such as | |
| 874 | a paragraph that refers to a table (or list, or other item) | |
| 875 | immediately following, use the | |
| 876 | .B KS | |
| 877 | and | |
| 878 | .B KE | |
| 879 | macros. | |
| 880 | The | |
| 881 | .B KS | |
| 882 | macro begins a block of text to be kept on a single page, | |
| 883 | and the | |
| 884 | .B KE | |
| 885 | macro ends the block. | |
| 465b256c | 886 | . |
| 92d0a6a6 JR |
887 | .PP |
| 888 | You can specify a | |
| 889 | .I "floating keep" | |
| 890 | using the | |
| 891 | .B KF | |
| 892 | and | |
| 893 | .B KE | |
| 894 | macros. | |
| 895 | If the keep cannot fit on the current page, | |
| 896 | .I groff | |
| 897 | holds the contents of the keep and allows text following | |
| 898 | the keep (in the source file) to fill in the remainder of | |
| 899 | the current page. | |
| 900 | When the page breaks, | |
| 901 | whether by an explicit | |
| 902 | .B bp | |
| 903 | request or by reaching the end of the page, | |
| 904 | .I groff | |
| 905 | prints the floating keep at the top of the new page. | |
| 906 | This is useful for printing large graphics or tables | |
| 907 | that do not need to appear exactly where specified. | |
| 465b256c JR |
908 | . |
| 909 | .PP | |
| 910 | The macros | |
| 911 | .B B1 | |
| 912 | and | |
| 913 | .B B2 | |
| 914 | can be used to enclose a text within a box; | |
| 915 | .B .B1 | |
| 916 | begins the box, and | |
| 917 | .B .B2 | |
| 918 | ends it. | |
| 919 | Text in the box is automatically placed in a diversion | |
| 920 | (keep). | |
| 921 | . | |
| 922 | . | |
| 92d0a6a6 | 923 | .SS "Tables, figures, equations, and references" |
| 465b256c | 924 | . |
| 92d0a6a6 JR |
925 | The |
| 926 | .I -ms | |
| 927 | macros support the standard | |
| 928 | .I groff | |
| 929 | preprocessors: | |
| 930 | .IR tbl , | |
| 931 | .IR pic , | |
| 932 | .IR eqn , | |
| 933 | and | |
| 934 | .IR refer . | |
| 935 | Mark text meant for preprocessors by enclosing it | |
| 936 | in pairs of tags as follows: | |
| 465b256c | 937 | . |
| 92d0a6a6 | 938 | .TP |
| 465b256c | 939 | .BR ".TS [H]" " and " .TE |
| 92d0a6a6 JR |
940 | Denotes a table, to be processed by the |
| 941 | .I tbl | |
| 942 | preprocessor. | |
| 943 | The optional | |
| 944 | .BR H "\~argument" | |
| 945 | instructs | |
| 946 | .I groff | |
| 947 | to create a running header with the information | |
| 948 | up to the | |
| 949 | .B TH | |
| 950 | macro. | |
| 951 | .I Groff | |
| 952 | prints the header at the beginning of the table; | |
| 953 | if the table runs onto another page, | |
| 954 | .I groff | |
| 955 | prints the header on the next page as well. | |
| 465b256c | 956 | . |
| 92d0a6a6 | 957 | .TP |
| 465b256c | 958 | .BR .PS " and " .PE |
| 92d0a6a6 JR |
959 | Denotes a graphic, to be processed by the |
| 960 | .I pic | |
| 961 | preprocessor. | |
| 962 | You can create a | |
| 963 | .I pic | |
| 964 | file by hand, using the | |
| 965 | AT&T | |
| 966 | .I pic | |
| 967 | manual available on the Web as a reference, | |
| 968 | or by using a graphics program such as | |
| 969 | .IR xfig . | |
| 465b256c | 970 | . |
| 92d0a6a6 | 971 | .TP |
| 465b256c | 972 | .BR ".EQ [\fI\,align\/\fP]" " and " .EN |
| 92d0a6a6 JR |
973 | Denotes an equation, to be processed by the |
| 974 | .I eqn | |
| 975 | preprocessor. | |
| 976 | The optional | |
| 977 | .I align | |
| 978 | argument can be | |
| 979 | .BR C , | |
| 980 | .BR L , | |
| 981 | or\~\c | |
| 982 | .B I | |
| 983 | to center (the default), left-justify, or indent | |
| 984 | the equation. | |
| 465b256c | 985 | . |
| 92d0a6a6 | 986 | .TP |
| 465b256c | 987 | .BR .[ " and " .] |
| 92d0a6a6 JR |
988 | Denotes a reference, to be processed by the |
| 989 | .I refer | |
| 990 | preprocessor. | |
| 991 | The GNU | |
| 992 | .IR @g@refer (@MAN1EXT@) | |
| 993 | manual page provides a comprehensive reference | |
| 994 | to the preprocessor and the format of the | |
| 995 | bibliographic database. | |
| 465b256c JR |
996 | . |
| 997 | . | |
| 92d0a6a6 | 998 | .SS Footnotes |
| 465b256c | 999 | . |
| 92d0a6a6 JR |
1000 | The |
| 1001 | .I ms | |
| 1002 | macros provide a flexible footnote system. | |
| 1003 | You can specify a numbered footnote by using the | |
| 1004 | .B \[rs]** | |
| 1005 | escape, followed by the text of the footnote | |
| 1006 | enclosed by | |
| 1007 | .B FS | |
| 1008 | and | |
| 1009 | .B FE | |
| 1010 | macros. | |
| 465b256c | 1011 | . |
| 92d0a6a6 JR |
1012 | .PP |
| 1013 | You can specify symbolic footnotes | |
| 1014 | by placing the mark character (such as | |
| 1015 | .B \[rs](dg | |
| 1016 | for the dagger character) in the body text, | |
| 1017 | followed by the text of the footnote | |
| 1018 | enclosed by | |
| 1019 | .B FS\ \[rs](dg | |
| 1020 | and | |
| 1021 | .B FE | |
| 1022 | macros. | |
| 465b256c | 1023 | . |
| 92d0a6a6 JR |
1024 | .PP |
| 1025 | You can control how | |
| 1026 | .I groff | |
| 1027 | prints footnote numbers by changing the value of the | |
| 1028 | .B FF | |
| 1029 | register as follows: | |
| 1030 | .RS | |
| 1031 | .ne 7 | |
| 465b256c | 1032 | . |
| 92d0a6a6 JR |
1033 | .TP |
| 1034 | 0 | |
| 1035 | Prints the footnote number as a superscript; indents the footnote (default). | |
| 465b256c | 1036 | . |
| 92d0a6a6 JR |
1037 | .TP |
| 1038 | 1 | |
| 1039 | Prints the number followed by a period (like\~1.\&) | |
| 1040 | and indents the footnote. | |
| 465b256c | 1041 | . |
| 92d0a6a6 JR |
1042 | .TP |
| 1043 | 2 | |
| 1044 | Like\~1, without an indent. | |
| 465b256c | 1045 | . |
| 92d0a6a6 JR |
1046 | .TP |
| 1047 | 3 | |
| 1048 | Like\~1, but prints the footnote number as a hanging paragraph. | |
| 465b256c | 1049 | . |
| 92d0a6a6 JR |
1050 | .LP |
| 1051 | .RE | |
| 1052 | You can use footnotes safely within keeps and displays, | |
| 1053 | but avoid using numbered footnotes within floating keeps. | |
| 1054 | You can set a second | |
| 1055 | .B \[rs]** | |
| 1056 | between a | |
| 1057 | .B \[rs]** | |
| 1058 | and its corresponding | |
| 1059 | .BR .FS ; | |
| 1060 | as long as each | |
| 1061 | .B .FS | |
| 1062 | occurs | |
| 1063 | .I after | |
| 1064 | the corresponding | |
| 1065 | .B \[rs]** | |
| 1066 | and the occurrences of | |
| 1067 | .B .FS | |
| 1068 | are in the same order as the corresponding occurrences of | |
| 1069 | .BR \[rs]** . | |
| 465b256c JR |
1070 | . |
| 1071 | . | |
| 92d0a6a6 | 1072 | .SS "Headers and footers" |
| 465b256c | 1073 | . |
| 4d3e9548 | 1074 | There are three ways to define headers and footers: |
| 465b256c | 1075 | . |
| 92d0a6a6 JR |
1076 | .IP \(bu 3n |
| 1077 | Use the strings | |
| 1078 | .BR LH , | |
| 1079 | .BR CH , | |
| 1080 | and | |
| 1081 | .B RH | |
| 1082 | to set the left, center, and right headers; use | |
| 1083 | .BR LF , | |
| 1084 | .BR CF , | |
| 1085 | and | |
| 1086 | .B RF | |
| 1087 | to set the left, center, and right footers. | |
| 1088 | This works best for documents that do not distinguish | |
| 1089 | between odd and even pages. | |
| 465b256c | 1090 | . |
| 92d0a6a6 JR |
1091 | .IP \(bu |
| 1092 | Use the | |
| 1093 | .B OH | |
| 1094 | and | |
| 1095 | .B EH | |
| 1096 | macros to define headers for the odd and even pages; and | |
| 1097 | .B OF | |
| 1098 | and | |
| 1099 | .B EF | |
| 1100 | macros to define footers for the odd and even pages. | |
| 1101 | This is more flexible than defining the individual strings. | |
| 1102 | The syntax for these macros is as follows: | |
| 1103 | .RS | |
| 465b256c | 1104 | . |
| 92d0a6a6 | 1105 | .IP |
| 465b256c | 1106 | .B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'" |
| 92d0a6a6 | 1107 | .RE |
| 465b256c | 1108 | . |
| 92d0a6a6 JR |
1109 | .IP |
| 1110 | You can replace the quote (') marks with any character not | |
| 1111 | appearing in the header or footer text. | |
| 465b256c | 1112 | . |
| 4d3e9548 JL |
1113 | .PP |
| 1114 | You can also redefine the | |
| 1115 | .B PT | |
| 1116 | and | |
| 1117 | .B BT | |
| 1118 | macros to change the behavior of | |
| 1119 | the header and footer, respectively. | |
| 1120 | The header process also calls the (undefined) | |
| 1121 | .B HD | |
| 1122 | macro after | |
| 1123 | .B PT ; | |
| 1124 | you can define this macro if you need additional processing | |
| 1125 | after printing the header | |
| 1126 | (for example, to draw a line below the header). | |
| 1127 | . | |
| 465b256c | 1128 | . |
| 92d0a6a6 | 1129 | .SS Margins |
| 465b256c | 1130 | . |
| 92d0a6a6 JR |
1131 | You control margins using a set of number registers. |
| 1132 | The following table lists the register names and defaults: | |
| 1133 | .RS | |
| 1134 | .ne 8 | |
| 1135 | .na | |
| 1136 | .TS | |
| 4d3e9548 JL |
1137 | cb cb cb cb |
| 1138 | lfCW l l l. | |
| 92d0a6a6 JR |
1139 | Reg. Definition Effective Default |
| 1140 | _ | |
| 4d3e9548 JL |
1141 | PO Page offset (left margin) next page 1i |
| 1142 | LL Line length next paragraph 6i | |
| 1143 | LT Header/footer length next paragraph 6i | |
| 1144 | HM Top (header) margin next page 1i | |
| 1145 | FM Bottom (footer) margin next page 1i | |
| 92d0a6a6 JR |
1146 | _ |
| 1147 | .TE | |
| 1148 | .RE | |
| 1149 | .ad | |
| 465b256c | 1150 | . |
| 92d0a6a6 JR |
1151 | .PP |
| 1152 | Note that there is no right margin setting. | |
| 1153 | The combination of page offset and line length | |
| 1154 | provide the information necessary to | |
| 1155 | derive the right margin. | |
| 465b256c JR |
1156 | . |
| 1157 | . | |
| 92d0a6a6 | 1158 | .SS "Multiple columns" |
| 465b256c | 1159 | . |
| 92d0a6a6 JR |
1160 | The |
| 1161 | .I ms | |
| 1162 | macros can set text in as many columns as will reasonably | |
| 1163 | fit on the page. | |
| 1164 | The following macros are available. | |
| 1165 | All of them force a page break if a multi-column mode is already set. | |
| 1166 | However, if the current mode is single-column, starting a multi-column | |
| 1167 | mode does | |
| 1168 | .I not | |
| 1169 | force a page break. | |
| 465b256c | 1170 | . |
| 92d0a6a6 | 1171 | .TP |
| 465b256c | 1172 | .B .1C |
| 92d0a6a6 | 1173 | Single-column mode. |
| 465b256c | 1174 | . |
| 92d0a6a6 | 1175 | .TP |
| 465b256c | 1176 | .B .2C |
| 92d0a6a6 | 1177 | Two-column mode. |
| 465b256c | 1178 | . |
| 92d0a6a6 | 1179 | .TP |
| 465b256c | 1180 | .BI ".MC [" width " [" gutter ]] |
| 92d0a6a6 JR |
1181 | Multi-column mode. |
| 1182 | If you specify no arguments, it is equivalent to the | |
| 1183 | .B 2C | |
| 1184 | macro. | |
| 1185 | Otherwise, | |
| 1186 | .I width | |
| 1187 | is the width of each column and | |
| 1188 | .I gutter | |
| 1189 | is the space between columns. | |
| 1190 | The | |
| 1191 | .B MINGW | |
| 1192 | number register is the default gutter width. | |
| 465b256c JR |
1193 | . |
| 1194 | . | |
| 92d0a6a6 | 1195 | .SS "Creating a table of contents" |
| 465b256c | 1196 | . |
| 92d0a6a6 JR |
1197 | Wrap text that you want to appear in the |
| 1198 | table of contents in | |
| 1199 | .B XS | |
| 1200 | and | |
| 1201 | .B XE | |
| 1202 | macros. | |
| 1203 | Use the | |
| 1204 | .B TC | |
| 1205 | macro to print the table of contents at the end of the document, | |
| 1206 | resetting the page number to\~\c | |
| 1207 | .B i | |
| 1208 | (Roman numeral\~1). | |
| 465b256c | 1209 | . |
| 92d0a6a6 JR |
1210 | .PP |
| 1211 | You can manually create a table of contents | |
| 1212 | by specifying a page number as the first argument to | |
| 1213 | .BR XS . | |
| 1214 | Add subsequent entries using the | |
| 1215 | .B XA | |
| 1216 | macro. | |
| 1217 | For example: | |
| 1218 | .RS | |
| 465b256c | 1219 | . |
| 92d0a6a6 JR |
1220 | .PP |
| 1221 | .ne 8 | |
| 1222 | .nf | |
| 1223 | \&.XS 1 | |
| 1224 | Introduction | |
| 1225 | \&.XA 2 | |
| 1226 | A Brief History of the Universe | |
| 1227 | \&.XA 729 | |
| 1228 | Details of Galactic Formation | |
| 1229 | \&.\|.\|. | |
| 1230 | \&.XE | |
| 1231 | .fi | |
| 1232 | .RE | |
| 465b256c | 1233 | . |
| 92d0a6a6 JR |
1234 | .LP |
| 1235 | Use the | |
| 1236 | .B PX | |
| 1237 | macro to print a manually-generated table of contents | |
| 1238 | without resetting the page number. | |
| 465b256c | 1239 | . |
| 92d0a6a6 JR |
1240 | .PP |
| 1241 | If you give the argument | |
| 1242 | .B no | |
| 1243 | to either | |
| 1244 | .B PX | |
| 1245 | or | |
| 1246 | .BR TC , | |
| 1247 | .I groff | |
| 1248 | suppresses printing the title | |
| 1249 | specified by the | |
| 1250 | .B \[rs]*[TOC] | |
| 1251 | string. | |
| 465b256c JR |
1252 | . |
| 1253 | . | |
| 1254 | .SS "Fractional point sizes" | |
| 1255 | . | |
| 1256 | Traditionally, the | |
| 1257 | .I ms | |
| 1258 | macros only support integer values for the document's font size and | |
| 1259 | vertical spacing. | |
| 1260 | To overcome this restriction, values larger than or equal to 1000 are taken | |
| 1261 | as fractional values, multiplied by 1000. | |
| 1262 | For example, `.nr\~PS\~10250' sets the font size to 10.25 points. | |
| 1263 | . | |
| 1264 | .LP | |
| 1265 | The following four registers accept fractional point sizes: | |
| 1266 | .BR PS , | |
| 1267 | .BR VS , | |
| 1268 | .BR FPS , | |
| 1269 | and | |
| 1270 | .BR FVS . | |
| 1271 | . | |
| 1272 | .LP | |
| 1273 | Due to backwards compatibility, the value of | |
| 1274 | .B VS | |
| 1275 | must be smaller than 40000 (this is 40.0 points). | |
| 1276 | . | |
| 1277 | . | |
| 1278 | . | |
| 92d0a6a6 | 1279 | .SH "DIFFERENCES FROM troff ms" |
| 465b256c | 1280 | . |
| 92d0a6a6 JR |
1281 | The |
| 1282 | .I "groff ms" | |
| 1283 | macros are a complete re-implementation, | |
| 1284 | using no original AT&T code. | |
| 1285 | Since they take advantage of the extended features in | |
| 1286 | .IR groff , | |
| 1287 | they cannot be used with AT&T | |
| 1288 | .IR troff . | |
| 1289 | Other differences include: | |
| 465b256c | 1290 | . |
| 92d0a6a6 JR |
1291 | .IP \(bu 3n |
| 1292 | The internals of | |
| 1293 | .I "groff ms" | |
| 1294 | differ from the internals of Unix | |
| 1295 | .IR ms . | |
| 1296 | Documents that depend upon implementation details of Unix | |
| 1297 | .I ms | |
| 1298 | may not format properly with | |
| 1299 | .IR "groff ms" . | |
| 465b256c | 1300 | . |
| 92d0a6a6 JR |
1301 | .IP \(bu |
| 1302 | The error-handling policy of | |
| 1303 | .I "groff ms" | |
| 1304 | is to detect and report errors, | |
| 1305 | rather than silently to ignore them. | |
| 465b256c | 1306 | . |
| 92d0a6a6 | 1307 | .IP \(bu |
| 4d3e9548 JL |
1308 | Some Bell Labs localisms are not implemented by default. |
| 1309 | However, if you call the otherwise undocumented | |
| 1310 | .BR SC | |
| 1311 | section-header macro, you will enable implementations of three other | |
| 1312 | archaic Bell Labs macros: | |
| 1313 | .BR UC , | |
| 1314 | .BR P1 , | |
| 1315 | and | |
| 1316 | .BR P2 . | |
| 1317 | These are not enabled by default because (a)\~they were not documented, | |
| 1318 | in the original | |
| 1319 | .IR "ms manual" , | |
| 1320 | and (b)\~the | |
| 1321 | .B P1 | |
| 1322 | and | |
| 1323 | .B UC | |
| 1324 | macros both collide with different macros in the Berkeley version of | |
| 1325 | .IR ms . | |
| 1326 | . | |
| 1327 | .IP | |
| 1328 | These emulations are sufficient to give back the 1976 Kernighan\~& Cherry | |
| 1329 | paper | |
| 1330 | .I "Typsetting Mathematics \(en User's Guide" | |
| 1331 | its section headings, and restore some text that had gone missing as | |
| 1332 | arguments of undefined macros. | |
| 1333 | No warranty express or implied is given as to how well the typographic | |
| 1334 | details these produce match the original Bell Labs macros. | |
| 465b256c | 1335 | . |
| 92d0a6a6 JR |
1336 | .IP \(bu |
| 1337 | Berkeley localisms, in particular the | |
| 1338 | .B TM | |
| 1339 | and | |
| 1340 | .B CT | |
| 1341 | macros, | |
| 1342 | are not implemented. | |
| 465b256c | 1343 | . |
| 92d0a6a6 JR |
1344 | .IP \(bu |
| 1345 | .I "Groff ms" | |
| 465b256c | 1346 | does not work in compatibility mode (e.g., with the |
| 92d0a6a6 JR |
1347 | .B \-C |
| 1348 | option). | |
| 465b256c | 1349 | . |
| 92d0a6a6 JR |
1350 | .IP \(bu |
| 1351 | There is no support for typewriter-like devices. | |
| 465b256c | 1352 | . |
| 92d0a6a6 JR |
1353 | .IP \(bu |
| 1354 | .I "Groff ms" | |
| 1355 | does not provide cut marks. | |
| 465b256c | 1356 | . |
| 92d0a6a6 JR |
1357 | .IP \(bu |
| 1358 | Multiple line spacing is not supported | |
| 1359 | (use a larger vertical spacing instead). | |
| 465b256c | 1360 | . |
| 92d0a6a6 JR |
1361 | .IP \(bu |
| 1362 | Some Unix | |
| 1363 | .I ms | |
| 1364 | documentation says that the | |
| 1365 | .B CW | |
| 1366 | and | |
| 1367 | .B GW | |
| 1368 | number registers can be used to control the column width and | |
| 465b256c JR |
1369 | gutter width, respectively. |
| 1370 | These number registers are not used in | |
| 1371 | .IR "groff ms" . | |
| 1372 | . | |
| 92d0a6a6 JR |
1373 | .IP \(bu |
| 1374 | Macros that cause a reset | |
| 465b256c | 1375 | (paragraphs, headings, etc.\&) |
| 92d0a6a6 JR |
1376 | may change the indent. |
| 1377 | Macros that change the indent do not increment or decrement | |
| 1378 | the indent, but rather set it absolutely. | |
| 1379 | This can cause problems for documents that define | |
| 1380 | additional macros of their own. | |
| 1381 | The solution is to use not the | |
| 1382 | .B in | |
| 1383 | request but instead the | |
| 1384 | .B RS | |
| 1385 | and | |
| 1386 | .B RE | |
| 1387 | macros. | |
| 465b256c | 1388 | . |
| 92d0a6a6 JR |
1389 | .IP \(bu |
| 1390 | The number register | |
| 1391 | .B GS | |
| 1392 | is set to\~1 by the | |
| 1393 | .I "groff ms" | |
| 1394 | macros, | |
| 1395 | but is not used by the Unix | |
| 1396 | .I ms | |
| 1397 | macros. | |
| 1398 | Documents that need to determine whether | |
| 1399 | they are being formatted with Unix | |
| 1400 | .I ms | |
| 1401 | or | |
| 1402 | .I "groff ms" | |
| 1403 | should use this number register. | |
| 465b256c JR |
1404 | . |
| 1405 | .IP \(bu | |
| 1406 | To make | |
| 1407 | .I "groff ms" | |
| 1408 | use the default page offset (which also specifies the left margin), | |
| 1409 | the | |
| 1410 | .B PO | |
| 1411 | number register must stay undefined until the first | |
| 1412 | .B ms | |
| 1413 | macro is evaluated. | |
| 1414 | This implies that | |
| 1415 | .B PO | |
| 1416 | should not be used early in the document, unless it is changed also: | |
| 1417 | Remember that accessing an undefined register automatically defines it. | |
| 92d0a6a6 | 1418 | .br |
| 465b256c JR |
1419 | .ne 23 |
| 1420 | . | |
| 1421 | . | |
| 92d0a6a6 | 1422 | .SS Strings |
| 465b256c | 1423 | . |
| 92d0a6a6 JR |
1424 | You can redefine the following strings to adapt the |
| 1425 | .I "groff ms" | |
| 1426 | macros to languages other than English: | |
| 1427 | .TS | |
| 1428 | center; | |
| 4d3e9548 JL |
1429 | cb cb |
| 1430 | lfCW l. | |
| 92d0a6a6 JR |
1431 | String Default Value |
| 1432 | _ | |
| 1433 | REFERENCES References | |
| 1434 | ABSTRACT ABSTRACT | |
| 1435 | TOC Table of Contents | |
| 1436 | MONTH1 January | |
| 1437 | MONTH2 February | |
| 1438 | MONTH3 March | |
| 1439 | MONTH4 April | |
| 1440 | MONTH5 May | |
| 1441 | MONTH6 June | |
| 1442 | MONTH7 July | |
| 1443 | MONTH8 August | |
| 1444 | MONTH9 September | |
| 1445 | MONTH10 October | |
| 1446 | MONTH11 November | |
| 1447 | MONTH12 December | |
| 1448 | _ | |
| 1449 | .TE | |
| 465b256c | 1450 | . |
| 92d0a6a6 JR |
1451 | .PP |
| 1452 | The | |
| 1453 | .B \[rs]*- | |
| 1454 | string produces an em dash \[em] like this. | |
| 465b256c JR |
1455 | . |
| 1456 | .PP | |
| 1457 | Use | |
| 1458 | .B \[rs]*Q | |
| 1459 | and | |
| 1460 | .B \[rs]*U | |
| 1461 | to get a left and right typographer's quote, | |
| 1462 | respectively, in | |
| 1463 | .I troff | |
| 1464 | (and plain quotes in | |
| 1465 | .IR nroff ). | |
| 1466 | ||
| 1467 | . | |
| 1468 | . | |
| 92d0a6a6 | 1469 | .SS Text Settings |
| 465b256c | 1470 | . |
| 92d0a6a6 JR |
1471 | The |
| 1472 | .B FAM | |
| 1473 | string sets the default font family. | |
| 1474 | If this string is undefined at initialization, | |
| 1475 | it is set to Times. | |
| 465b256c | 1476 | . |
| 92d0a6a6 JR |
1477 | .LP |
| 1478 | The point size, vertical spacing, and inter-paragraph spacing for footnotes | |
| 1479 | are controlled by the number registers | |
| 1480 | .BR FPS , | |
| 1481 | .BR FVS , | |
| 1482 | and | |
| 1483 | .BR FPD ; | |
| 1484 | at initialization these are set to | |
| 1485 | .BR \[rs]n(PS-2 , | |
| 1486 | .BR \[rs]n[FPS]+2 , | |
| 1487 | and | |
| 465b256c | 1488 | .BR \[rs]n(PD/2 , |
| 92d0a6a6 JR |
1489 | respectively. |
| 1490 | If any of these registers are defined before initialization, | |
| 1491 | the initialization macro does not change them. | |
| 465b256c | 1492 | . |
| 92d0a6a6 JR |
1493 | .LP |
| 1494 | The hyphenation flags (as set by the | |
| 1495 | .B hy | |
| 1496 | request) are set from the | |
| 1497 | .B HY | |
| 1498 | register; | |
| 1499 | the default is\~14. | |
| 465b256c | 1500 | . |
| 92d0a6a6 JR |
1501 | .PP |
| 1502 | Improved accent marks | |
| 1503 | (as originally defined in Berkeley's | |
| 1504 | .I ms | |
| 1505 | version) | |
| 1506 | are available by specifying the | |
| 1507 | .B AM | |
| 1508 | macro at the beginning of your document. | |
| 1509 | You can place an accent over most characters | |
| 1510 | by specifying the string defining the accent | |
| 1511 | directly after the character. | |
| 1512 | For example, | |
| 1513 | .B n\[rs]*~ | |
| 1514 | produces an n with a tilde over it. | |
| 465b256c JR |
1515 | . |
| 1516 | . | |
| 1517 | . | |
| 92d0a6a6 | 1518 | .SH "NAMING CONVENTIONS" |
| 465b256c JR |
1519 | . |
| 1520 | . | |
| 92d0a6a6 JR |
1521 | .LP |
| 1522 | The following conventions are used for names of macros, strings and | |
| 1523 | number registers. | |
| 1524 | External names available to documents that use the | |
| 1525 | .I "groff ms" | |
| 1526 | macros contain only uppercase letters and digits. | |
| 465b256c | 1527 | . |
| 92d0a6a6 JR |
1528 | .LP |
| 1529 | Internally the macros are divided into modules; | |
| 1530 | naming conventions are as follows: | |
| 465b256c | 1531 | . |
| 92d0a6a6 JR |
1532 | .IP \(bu 3n |
| 1533 | Names used only within one module are of the form | |
| 1534 | .IB \%module * name\fR. | |
| 465b256c | 1535 | . |
| 92d0a6a6 JR |
1536 | .IP \(bu |
| 1537 | Names used outside the module in which they are defined are of the form | |
| 1538 | .IB \%module @ name\fR. | |
| 465b256c | 1539 | . |
| 92d0a6a6 JR |
1540 | .IP \(bu |
| 1541 | Names associated with a particular environment are of the form | |
| 465b256c | 1542 | .IB \%environment : name\fR; |
| 92d0a6a6 JR |
1543 | these are used only within the |
| 1544 | .B par | |
| 1545 | module. | |
| 465b256c | 1546 | . |
| 92d0a6a6 JR |
1547 | .IP \(bu |
| 1548 | .I name | |
| 1549 | does not have a module prefix. | |
| 465b256c | 1550 | . |
| 92d0a6a6 JR |
1551 | .IP \(bu |
| 1552 | Constructed names used to implement arrays are of the form | |
| 1553 | .IB \%array ! index\fR. | |
| 465b256c | 1554 | . |
| 92d0a6a6 JR |
1555 | .PP |
| 1556 | Thus the groff ms macros reserve the following names: | |
| 465b256c | 1557 | . |
| 92d0a6a6 JR |
1558 | .IP \(bu 3n |
| 1559 | Names containing the characters | |
| 1560 | .BR * , | |
| 1561 | .BR @ , | |
| 1562 | and\~\c | |
| 1563 | .BR : . | |
| 465b256c | 1564 | . |
| 92d0a6a6 JR |
1565 | .IP \(bu |
| 1566 | Names containing only uppercase letters and digits. | |
| 465b256c JR |
1567 | . |
| 1568 | . | |
| 1569 | . | |
| 92d0a6a6 | 1570 | .SH FILES |
| 465b256c | 1571 | . |
| 92d0a6a6 JR |
1572 | .B @MACRODIR@/ms.tmac |
| 1573 | (a wrapper file for | |
| 1574 | .BR s.tmac ) | |
| 1575 | .br | |
| 1576 | .B @MACRODIR@/s.tmac | |
| 465b256c JR |
1577 | . |
| 1578 | . | |
| 1579 | . | |
| 92d0a6a6 | 1580 | .SH "SEE ALSO" |
| 465b256c | 1581 | . |
| 92d0a6a6 JR |
1582 | .BR groff (@MAN1EXT@), |
| 1583 | .BR @g@troff (@MAN1EXT@), | |
| 1584 | .BR @g@tbl (@MAN1EXT@), | |
| 1585 | .BR @g@pic (@MAN1EXT@), | |
| 1586 | .BR @g@eqn (@MAN1EXT@), | |
| 1587 | .BR @g@refer (@MAN1EXT@), | |
| 1588 | .I Groff: The GNU Implementation of troff | |
| 1589 | by Trent Fisher and Werner Lemberg. | |
| 465b256c JR |
1590 | . |
| 1591 | . | |
| 1592 | . | |
| 92d0a6a6 | 1593 | .SH AUTHOR |
| 465b256c | 1594 | . |
| 92d0a6a6 JR |
1595 | Original manual page by James Clark |
| 1596 | .IR "et al" ; | |
| 1597 | rewritten by Larry Kollar | |
| 1598 | (\fIlkollar@despammed.com\fR). | |
| 1599 | . | |
| 1600 | .cp \n[groff_ms_C] | |
| 1601 | . | |
| 1602 | .\" Local Variables: | |
| 1603 | .\" mode: nroff | |
| 1604 | .\" End: |