Commit | Line | Data |
---|---|---|
8340f87c BJ |
1 | .RP |
2 | ....TM 76-1274-16 39199 39199-11 | |
3 | ....ND October 8, 1976 | |
4 | .nr CW 2.85i | |
5 | .nr GW .3i | |
6 | .TL | |
7 | Typing Documents on the UNIX System: | |
8 | .br | |
9 | \!.br | |
10 | Using the \-ms Macros with Troff and Nroff | |
11 | .AU "MH 2C-572" 6377 | |
12 | M. E. Lesk | |
13 | .AI | |
14 | .MH | |
15 | .OK | |
16 | Text Formatting | |
17 | Phototypesetting | |
18 | .AB | |
19 | This document describes a set of easy-to-use macros | |
20 | for preparing documents on the UNIX system. | |
21 | Documents may be produced on either the | |
22 | phototypesetter or a on a computer terminal, | |
23 | without changing the input. | |
24 | .PP | |
25 | The macros provide facilities for paragraphs, sections (optionally | |
26 | with automatic numbering), page titles, footnotes, | |
27 | equations, | |
28 | tables, two-column format, and | |
29 | cover pages for papers. | |
30 | .PP | |
31 | This memo includes, as an appendix, | |
32 | the text of the ``Guide to Preparing | |
33 | Documents with \-ms'' | |
34 | which contains additional examples | |
35 | of features of \-ms. | |
36 | .PP | |
37 | This manual is a revision of, and replaces, | |
38 | ``Typing Documents on UNIX,'' | |
39 | dated November 22, 1974. | |
40 | .AE | |
41 | .CS 6 6 12 1 0 8 | |
42 | .bd I 3 | |
43 | .PP | |
44 | .I | |
45 | Introduction. | |
46 | .R | |
47 | This memorandum describes a package of commands to produce | |
48 | papers | |
49 | using the | |
50 | .bd I | |
51 | .I | |
52 | troff | |
53 | .R | |
54 | and | |
55 | .I nroff | |
56 | formatting programs on the | |
57 | .SM | |
58 | UNIX | |
59 | .NL | |
60 | system. | |
61 | As with other | |
62 | .I roff -derived | |
63 | programs, | |
64 | text is prepared interspersed with formatting commands. | |
65 | However, this package, | |
66 | which itself is written in | |
67 | .I troff | |
68 | commands, | |
69 | provides higher-level commands | |
70 | than those provided with the basic | |
71 | .I troff | |
72 | program. | |
73 | The commands available in this package are listed in | |
74 | Appendix A. | |
75 | .bd I 3 | |
76 | .PP | |
77 | .I | |
78 | Text. | |
79 | .R | |
80 | Type normally, except that instead of indenting for paragraphs, | |
81 | place a line reading ``.PP'' before each paragraph. | |
82 | This will produce indenting and extra space. | |
83 | .LP | |
84 | Alternatively, the command .LP that was used here will produce | |
85 | a left-aligned (block) paragraph. | |
86 | The paragraph spacing can be changed: see below under ``Registers.'' | |
87 | .PP | |
88 | .I | |
89 | Beginning. | |
90 | .R | |
91 | For a document with a paper-type cover sheet, the input should start as follows: | |
92 | .DS L | |
93 | [optional overall format .RP \- see below] | |
94 | .TL | |
95 | Title of document (one or more lines) | |
96 | .AU | |
97 | Author(s) (may also be several lines) | |
98 | .AI | |
99 | Author's institution(s) | |
100 | .AB | |
101 | Abstract; to be placed on the cover sheet of a paper. | |
102 | Line length is 5/6 of normal; use .ll here to change. | |
103 | .AE (abstract end) | |
104 | text ... (begins with .PP, which see) | |
105 | .DE | |
106 | To omit some of the standard headings | |
107 | (e.g. no abstract, or no author's institution) just | |
108 | omit the corresponding fields and command lines. | |
109 | The word | |
110 | .SM | |
111 | ABSTRACT | |
112 | .NL | |
113 | can be suppressed by writing ``.AB no'' for ``.AB''. | |
114 | Several interspersed .AU and .AI lines can be used for multiple authors. | |
115 | The headings are not compulsory: beginning | |
116 | with a .PP command is perfectly OK and will just | |
117 | start printing an ordinary paragraph. | |
118 | .I Warning: | |
119 | You can't just begin a document with a line of text. | |
120 | Some \-ms command must | |
121 | precede any text input. When in doubt, use .LP | |
122 | to get proper initialization, although any of | |
123 | the commands .PP, .LP, .TL, .SH, .NH is good enough. | |
124 | Figure 1 shows the legal arrangement of commands at the | |
125 | start of a document. | |
126 | .PP | |
127 | .I | |
128 | Cover Sheets and First Pages. | |
129 | .R | |
130 | The first line | |
131 | of a document signals the general format of the first page. | |
132 | In particular, if it is ".RP" a cover sheet with title and | |
133 | abstract is prepared. | |
134 | The default format | |
135 | is useful for scanning drafts. | |
136 | .PP | |
137 | In general \-ms is arranged so that only one form | |
138 | of a document need be stored, containing all | |
139 | information; the first command gives the format, | |
140 | and unnecessary items for that format are ignored. | |
141 | .PP | |
142 | Warning: don't put extraneous material | |
143 | between the .TL and .AE commands. Processing | |
144 | of the titling items is | |
145 | special, and other data placed in them may not behave | |
146 | as you expect. | |
147 | Don't forget that some \-ms command must precede any input text. | |
148 | .PP | |
149 | .I | |
150 | Page headings. | |
151 | .R | |
152 | The \-ms macros, by default, will print a page heading containing | |
153 | a page number (if greater than 1). | |
154 | A default page footer is provided only in | |
155 | .I nroff , | |
156 | where the date is used. | |
157 | The user can make minor adjustments to the page headings/footings | |
158 | by redefining the | |
159 | strings | |
160 | LH, CH, and RH | |
161 | which are the left, center and right portions of the page headings, | |
162 | respectively; and the | |
163 | strings | |
164 | LF, CF, and RF, | |
165 | which are the left, center and right portions of the page footer. | |
166 | For more complex formats, the user can redefine | |
167 | the macros PT and BT, which are invoked respectively at the top | |
168 | and bottom of each page. | |
169 | The margins (taken from registers HM and FM for the top and bottom | |
170 | margin respectively) are normally 1 inch; the page header/footer are | |
171 | in the middle of that space. | |
172 | The user who redefines these macros should be careful | |
173 | not to change parameters such as point size or font | |
174 | without resetting them to default values. | |
175 | .PP | |
176 | .2C | |
177 | .I | |
178 | Multi-column formats. | |
179 | .R | |
180 | If you place the command ``.2C'' in your document, the document will | |
181 | be printed in double column format beginning | |
182 | at that point. This feature is not too useful in computer | |
183 | terminal output, but is often desirable on the typesetter. | |
184 | The command ``.1C'' will go | |
185 | back to one-column format and also skip to a new page. | |
186 | The ``.2C'' command is actually a special case of the command | |
187 | .DS L | |
188 | .MC [column width [gutter width]] | |
189 | .DE | |
190 | which makes multiple columns with the specified column | |
191 | and gutter width; as many columns as will fit across the page | |
192 | are used. | |
193 | Thus triple, quadruple, ... column pages can be printed. | |
194 | Whenever the number of columns is changed (except going from | |
195 | full width to some larger number of columns) | |
196 | a new page is started. | |
197 | .PP | |
198 | .I | |
199 | Headings. | |
200 | .R | |
201 | To produce a special heading, there are two commands. | |
202 | If you type | |
203 | .DS L | |
204 | .NH | |
205 | type section heading here | |
206 | may be several lines | |
207 | .DE | |
208 | you will get automatically numbered section headings (1, 2, 3, ...), | |
209 | in boldface. | |
210 | For example, | |
211 | .DS L | |
212 | .NH | |
213 | Care and Feeding of Department Heads | |
214 | .DE | |
215 | produces | |
216 | .NH | |
217 | Care and Feeding of Department Heads | |
218 | .PP | |
219 | Alternatively, | |
220 | .DS L | |
221 | .SH | |
222 | Care and Feeding of Directors | |
223 | .DE | |
224 | will print the heading with no number added: | |
225 | .SH | |
226 | Care and Feeding of Directors | |
227 | .PP | |
228 | Every section heading, of either type, should be followed | |
229 | by a paragraph beginning with .PP or .LP, indicating | |
230 | the end of the heading. | |
231 | Headings may contain more than one line | |
232 | of text. | |
233 | .PP | |
234 | The .NH command also supports more complex numbering schemes. | |
235 | If a numerical argument is given, it is taken to be a | |
236 | ``level'' number and an appropriate sub-section | |
237 | number is generated. | |
238 | Larger level numbers indicate deeper | |
239 | sub-sections, as in this example: | |
240 | .DS L | |
241 | .NH | |
242 | Erie-Lackawanna | |
243 | .NH 2 | |
244 | Morris and Essex Division | |
245 | .NH 3 | |
246 | Gladstone Branch | |
247 | .NH 3 | |
248 | Montclair Branch | |
249 | .NH 2 | |
250 | Boonton Line | |
251 | .DE | |
252 | generates: | |
253 | .NH | |
254 | Erie-Lackawanna | |
255 | .NH 2 | |
256 | Morris and Essex Division | |
257 | .NH 3 | |
258 | Gladstone Branch | |
259 | .NH 3 | |
260 | Montclair Branch | |
261 | .NH 2 | |
262 | Boonton Line | |
263 | .PP | |
264 | An explicit ``.NH 0'' will reset the numbering of level 1 | |
265 | to one, as here: | |
266 | .DS L | |
267 | .NH 0 | |
268 | Penn Central | |
269 | .DE | |
270 | .ft 3 | |
271 | .if n .ul 1 | |
272 | .sp 1 | |
273 | 1. Penn Central | |
274 | .PP | |
275 | .I | |
276 | Indented paragraphs. | |
277 | .R | |
278 | (Paragraphs with hanging numbers, e.g. references.) | |
279 | The sequence | |
280 | .DS L | |
281 | .IP [1] | |
282 | Text for first paragraph, typed | |
283 | normally for as long as you would | |
284 | like on as many lines as needed. | |
285 | .IP [2] | |
286 | Text for second paragraph, ... | |
287 | .DE | |
288 | produces | |
289 | .IP [1] | |
290 | Text for first paragraph, typed normally for as long | |
291 | as you would like on as many lines as | |
292 | needed. | |
293 | .IP [2] | |
294 | Text for second paragraph, ... | |
295 | .LP | |
296 | A series of indented paragraphs may be followed by an ordinary paragraph | |
297 | beginning with .PP or .LP, | |
298 | depending on whether you wish indenting or not. | |
299 | The command .LP was used here. | |
300 | .PP | |
301 | More sophisticated uses of .IP are also possible. | |
302 | If the label is omitted, for example, a plain block indent | |
303 | is produced. | |
304 | .DS L | |
305 | .IP | |
306 | This material will | |
307 | just be turned into a | |
308 | block indent suitable for quotations or | |
309 | such matter. | |
310 | .LP | |
311 | .DE | |
312 | will produce | |
313 | .IP | |
314 | This material | |
315 | will just be turned | |
316 | into a block indent | |
317 | suitable for | |
318 | quotations or such matter. | |
319 | .LP | |
320 | If a non-standard amount of indenting is required, | |
321 | it may be specified after the label (in character positions) | |
322 | and will remain in effect until the next .PP or .LP. | |
323 | Thus, the general form of the .IP command | |
324 | contains two additional fields: the label and the indenting | |
325 | length. For example, | |
326 | .DS L | |
327 | .IP first: 9 | |
328 | Notice the longer label, requiring larger | |
329 | indenting for these paragraphs. | |
330 | .IP second: | |
331 | And so forth. | |
332 | .LP | |
333 | .DE | |
334 | produces this: | |
335 | .IP first: 9 | |
336 | Notice the longer label, requiring larger | |
337 | indenting for these paragraphs. | |
338 | .IP second: | |
339 | And so forth. | |
340 | .LP | |
341 | It is also possible to produce multiple nested indents; | |
342 | the command .RS indicates that the next .IP starts from the | |
343 | current indentation level. | |
344 | Each .RE will eat up one level of indenting | |
345 | so you should balance .RS and .RE commands. | |
346 | The .RS command should be thought of as ``move right'' and | |
347 | the .RE command as ``move left''. | |
348 | As an example | |
349 | .DS L | |
350 | .IP 1. | |
351 | Bell Laboratories | |
352 | .RS | |
353 | .IP 1.1 | |
354 | Murray Hill | |
355 | .IP 1.2 | |
356 | Holmdel | |
357 | .IP 1.3 | |
358 | Whippany | |
359 | .RS | |
360 | .IP 1.3.1 | |
361 | Madison | |
362 | .RE | |
363 | .IP 1.4 | |
364 | Chester | |
365 | .RE | |
366 | .LP | |
367 | .DE | |
368 | will result in | |
369 | .IP 1. | |
370 | Bell Laboratories | |
371 | .RS | |
372 | .IP 1.1 | |
373 | Murray Hill | |
374 | .IP 1.2 | |
375 | Holmdel | |
376 | .IP 1.3 | |
377 | Whippany | |
378 | .RS | |
379 | .IP 1.3.1 | |
380 | Madison | |
381 | .RE | |
382 | .IP 1.4 | |
383 | Chester | |
384 | .RE | |
385 | .LP | |
386 | All of these variations on .LP leave the right | |
387 | margin untouched. Sometimes, for purposes | |
388 | such as setting off a quotation, a paragraph indented | |
389 | on both right and left is required. | |
390 | .QP | |
391 | A single paragraph | |
392 | like this is obtained | |
393 | by preceding it with .QP. | |
394 | More complicated material (several paragraphs) should be | |
395 | bracketed with .QS and .QE. | |
396 | .LP | |
397 | .I | |
398 | Emphasis. | |
399 | .R | |
400 | To get | |
401 | italics | |
402 | (on the typesetter) or underlining (on the terminal) | |
403 | say | |
404 | .DS L | |
405 | .I | |
406 | as much text as you want | |
407 | can be typed here | |
408 | .R | |
409 | .DE | |
410 | .bd I | |
411 | .br | |
412 | as was done for | |
413 | .I | |
414 | these three words. | |
415 | .R | |
416 | The .R command restores the normal (usually Roman) font. | |
417 | If only one word is to be italicized, it | |
418 | may be just given on the line with the .I command, | |
419 | .br | |
420 | .bd I 3 | |
421 | .DS | |
422 | .I word | |
423 | .DE | |
424 | and in this case no .R is needed to restore | |
425 | the previous font. | |
426 | .B | |
427 | Boldface | |
428 | .R | |
429 | can be produced by | |
430 | .DS L | |
431 | .B | |
432 | Text to be set in boldface | |
433 | goes here | |
434 | .R | |
435 | .DE | |
436 | and also will be underlined on the terminal or line printer. | |
437 | As with .I, a single word can be placed in boldface | |
438 | by placing it on the same line as the .B command. | |
439 | .PP | |
440 | A few size changes | |
441 | can be specified similarly with | |
442 | the commands .LG (make larger), .SM (make smaller), and .NL | |
443 | (return to normal size). | |
444 | The size change | |
445 | is two points; the commands may be repeated for | |
446 | .SM | |
447 | increased | |
448 | .SM | |
449 | effect | |
450 | .NL | |
451 | (here one .NL canceled two .SM commands). | |
452 | .PP | |
453 | If actual | |
454 | .UL underlining | |
455 | as opposed to italicizing is required on the typesetter, | |
456 | the command | |
457 | .DS | |
458 | .UL word | |
459 | .DE | |
460 | will underline a word. There is no way to underline | |
461 | multiple words on the typesetter. | |
462 | .PP | |
463 | .I | |
464 | Footnotes. | |
465 | .R | |
466 | Material placed between lines with the commands .FS | |
467 | (footnote) and .FE (footnote end) will | |
468 | be collected, remembered, and finally placed | |
469 | at the bottom of the current page*. | |
470 | By default, footnotes are 11/12th the | |
471 | length of normal text, | |
472 | but this can be changed using the FL register (see below). | |
473 | .FS | |
474 | * Like this. | |
475 | .FE | |
476 | .PP | |
477 | .I | |
478 | Displays and Tables. | |
479 | .R | |
480 | To prepare displays of lines, such as tables, in which | |
481 | the lines should not be re-arranged, | |
482 | enclose them in the commands .DS and .DE | |
483 | .DS L | |
484 | .DS | |
485 | table lines, like the | |
486 | examples here, are placed | |
487 | between .DS and .DE | |
488 | .DE | |
489 | .DE | |
490 | By default, lines between .DS and .DE are indented and left-adjusted. | |
491 | You can also center lines, or retain the left margin. | |
492 | Lines bracketed by .DS C and .DE commands are | |
493 | centered (and not re-arranged); lines bracketed | |
494 | by .DS L and .DE are left-adjusted, not indented, and | |
495 | not re-arranged. | |
496 | A plain .DS is equivalent | |
497 | to .DS I, which indents and left-adjusts. Thus, | |
498 | .DS C | |
499 | these lines were preceded | |
500 | by .DS C and followed by | |
501 | a .DE command; | |
502 | .DE | |
503 | whereas | |
504 | .DS L | |
505 | these lines were preceded | |
506 | by .DS L and followed by | |
507 | a .DE command. | |
508 | .DE | |
509 | Note that .DS C centers each line; there is a variant .DS B | |
510 | that makes the display into a left-adjusted block of text, and | |
511 | then centers that entire block. | |
512 | Normally a display is kept together, on one page. | |
513 | If you wish to have a long display which | |
514 | may be split across page | |
515 | boundaries, | |
516 | use .CD, .LD, or .ID in place of | |
517 | the commands .DS C, .DS L, or .DS I respectively. | |
518 | An extra argument to the .DS I or .DS command is taken | |
519 | as an amount to indent. | |
520 | Note: it is tempting to assume that .DS R will right adjust | |
521 | lines, but it doesn't work. | |
522 | .PP | |
523 | .I | |
524 | Boxing words or lines. | |
525 | .R | |
526 | To draw rectangular boxes around words the command | |
527 | .DS L | |
528 | .BX word | |
529 | .DE | |
530 | will print | |
531 | .BX word | |
532 | as shown. | |
533 | The boxes will not be neat on a terminal, and this | |
534 | should not be used as a substitute for italics. | |
535 | .B1 | |
536 | Longer pieces of text may be boxed | |
537 | by enclosing them with .B1 and .B2: | |
538 | .DS L | |
539 | .B1 | |
540 | text... | |
541 | .B2 | |
542 | .DE | |
543 | as has been done here. | |
544 | .B2 | |
545 | .PP | |
546 | .I | |
547 | Keeping blocks together. | |
548 | .R | |
549 | If you wish to keep a table or other block of lines | |
550 | together on a page, there are ``keep - release'' commands. | |
551 | If a block of lines preceded by .KS and followed by .KE does | |
552 | not fit on the remainder of the current page, it will begin | |
553 | on a new page. | |
554 | Lines bracketed by .DS and .DE commands are automatically | |
555 | kept together this way. | |
556 | There is also a ``keep floating'' command: if the | |
557 | block to be kept together is preceded by .KF instead of .KS | |
558 | and does not fit | |
559 | on the current page, it will be moved down through the text | |
560 | until the top of the next page. Thus, no large blank space | |
561 | will be introduced in the document. | |
562 | .PP | |
563 | .I | |
564 | Nroff/Troff commands. | |
565 | .R | |
566 | Among the useful commands from the basic formatting programs | |
567 | are the following. They all work with both typesetter and | |
568 | computer terminal output: | |
569 | .DS L | |
570 | .bp - begin new page. | |
571 | .br - ``break'', stop running text | |
572 | from line to line. | |
573 | .sp n - insert n blank lines. | |
574 | .na - don't adjust right margins. | |
575 | .DE | |
576 | .PP | |
577 | .I | |
578 | Date. | |
579 | .R | |
580 | By default, documents produced on computer terminals have the | |
581 | date at the bottom of each page; documents produced on | |
582 | the typesetter don't. | |
583 | To force the date, say ``.DA''. To force no date, say ``.ND''. | |
584 | To lie about the date, say ``.DA July 4, 1776'' | |
585 | which puts the specified date at the bottom of each page. | |
586 | The command | |
587 | .DS L | |
588 | .ND May 8, 1945 | |
589 | .DE | |
590 | in ".RP" format | |
591 | places the specified date on the cover sheet and nowhere else. | |
592 | Place this line before the title. | |
593 | .PP | |
594 | .I | |
595 | Signature line. | |
596 | .R | |
597 | You can obtain a signature line by placing | |
598 | the command .SG in the document. | |
599 | The authors' names will | |
600 | be output in place of the .SG line. | |
601 | An argument to .SG | |
602 | is used | |
603 | as a typing identification line, and | |
604 | placed after the signatures. | |
605 | The .SG command is ignored | |
606 | in released paper format. | |
607 | .PP | |
608 | .I | |
609 | Registers. | |
610 | .R | |
611 | Certain of the registers used by \-ms can | |
612 | be altered to change default | |
613 | settings. | |
614 | They should be changed with .nr commands, | |
615 | as with | |
616 | .DS | |
617 | .nr PS 9 | |
618 | .DE | |
619 | .bd I | |
620 | to make the default point size 9 point. | |
621 | If the effect is needed immediately, the | |
622 | normal | |
623 | .I | |
624 | troff | |
625 | .R | |
626 | command should be used | |
627 | in addition to changing the number register. | |
628 | .br | |
629 | .ps 9 | |
630 | .vs 10p | |
631 | .TS | |
632 | c0 c c c | |
633 | c c c c | |
634 | a l l l. | |
635 | Register Defines Takes Default | |
636 | effect | |
637 | PS point size next para. 10 | |
638 | VS line spacing next para. 12 pts | |
639 | LL line length next para. 6\(fm\(fm | |
640 | LT title length next para. 6\(fm\(fm | |
641 | PD para. spacing next para. 0.3 VS | |
642 | PI para. indent next para. 5 ens | |
643 | FL footnote length next FS 11/12 LL | |
644 | CW column width next 2C 7/15 LL | |
645 | GW intercolumn gap next 2C 1/15 LL | |
646 | PO page offset next page 26/27\(fm\(fm | |
647 | HM top margin next page 1\(fm\(fm | |
648 | FM bottom margin next page 1\(fm\(fm | |
649 | .TE | |
650 | .ps \n(PS | |
651 | .vs \n(VS | |
652 | You may also alter | |
653 | the strings | |
654 | LH, CH, and RH which are the left, center, and right headings | |
655 | respectively; and similarly LF, CF, and RF which are strings in the | |
656 | page footer. | |
657 | The page number on | |
658 | .I | |
659 | output | |
660 | .R | |
661 | is taken from register PN, to permit | |
662 | changing its output style. | |
663 | For more complicated headers and footers | |
664 | the macros PT and BT can be redefined, as | |
665 | explained earlier. | |
666 | .bd I 3 | |
667 | .PP | |
668 | .I | |
669 | Accents. | |
670 | .R | |
671 | To simplify typing certain foreign words, | |
672 | strings representing common accent marks are defined. | |
673 | They precede the letter over which the mark | |
674 | is to appear. | |
675 | Here are the strings: | |
676 | .TS | |
677 | center; | |
678 | c c6 c c. | |
679 | Input Output Input Output | |
680 | \e*\(fme \*'e \e*~a \*~a | |
681 | \e*\(gae \*`e \e*Ce \h'0.15m'\v'-0.6m'\s6\zv\s0\v'0.6m'\h'-0.15m'e | |
682 | \e*:u \*:u \e*,c \*,c | |
683 | \e*^e \o'^e' | |
684 | .TE | |
685 | .PP | |
686 | .I | |
687 | Use. | |
688 | .R | |
689 | After your document is prepared and stored on a file, | |
690 | you can print it on a terminal with the command* | |
691 | .bd I | |
692 | .FS | |
693 | * If .2C was used, pipe the | |
694 | .I nroff | |
695 | output | |
696 | through | |
697 | .I col; | |
698 | make the first line of the input | |
699 | ``.pi /usr/bin/col.'' | |
700 | .br | |
701 | .FE | |
702 | .DS L | |
703 | .I | |
704 | nroff \-ms file | |
705 | .R | |
706 | .DE | |
707 | and you can print it on the typesetter with the | |
708 | command | |
709 | .DS L | |
710 | .I | |
711 | troff \-ms file | |
712 | .R | |
713 | .DE | |
714 | (many options are possible). | |
715 | In each case, if your document is stored in several files, | |
716 | just list all the filenames | |
717 | where we have used ``file''. | |
718 | If equations or tables are used, | |
719 | .I | |
720 | eqn | |
721 | .R | |
722 | and/or | |
723 | .I | |
724 | tbl | |
725 | .R | |
726 | must be invoked as preprocessors. | |
727 | .br | |
728 | .bd I 3 | |
729 | .PP | |
730 | .I | |
731 | References and further study. | |
732 | .R | |
733 | If you have to do Greek or mathematics, see | |
734 | .I eqn | |
735 | [1] | |
736 | for equation setting. | |
737 | To aid | |
738 | .I eqn | |
739 | users, | |
740 | .I \-ms | |
741 | provides definitions of .EQ and .EN | |
742 | which normally center the equation and set it off slightly. | |
743 | An argument on .EQ is taken to be an equation | |
744 | number and placed in the right margin near the equation. | |
745 | In addition, there are three special arguments to EQ: | |
746 | the letters C, I, and L indicate centered (default), | |
747 | indented, and left adjusted equations, respectively. | |
748 | If there is both a format argument | |
749 | and an equation number, | |
750 | give the format argument first, as in | |
751 | .bd I | |
752 | .DS | |
753 | .EQ L (1.3a) | |
754 | .DE | |
755 | for a left-adjusted equation numbered (1.3a). | |
756 | .PP | |
757 | Similarly, | |
758 | the macros .TS and .TE | |
759 | are defined | |
760 | to separate tables (see [2]) from text with a little space. | |
761 | A very long table with a heading may be broken | |
762 | across pages by beginning it with .TS H | |
763 | instead of .TS, | |
764 | and placing the line .TH in the table data | |
765 | after the heading. If the table | |
766 | has no heading repeated from page to page, | |
767 | just use the ordinary .TS and .TE macros. | |
768 | .PP | |
769 | To learn more about | |
770 | .I troff | |
771 | see | |
772 | [3] for a general introduction, and [4] | |
773 | for the full details (experts only). | |
774 | Information on related UNIX commands | |
775 | is in [5]. | |
776 | For jobs that do not seem well-adapted | |
777 | to \-ms, consider other macro packages. | |
778 | It is often far easier to write a specific macro packages | |
779 | for such tasks as imitating particular journals than | |
780 | to try to adapt \-ms. | |
781 | .PP | |
782 | .bd I 3 | |
783 | .I | |
784 | Acknowledgment. | |
785 | .R | |
786 | Many thanks are due to Brian Kernighan for | |
787 | his help in the design and implementation of this package, | |
788 | and for his assistance in preparing this manual. | |
789 | .bd I | |
790 | .SH | |
791 | .ce | |
792 | References | |
793 | .PP | |
794 | .IP [1] | |
795 | B. W. Kernighan and L. L. Cherry, | |
796 | .I | |
797 | Typesetting Mathematics \(em Users Guide (2nd edition), | |
798 | .R | |
799 | Bell Laboratories Computing Science Report no. 17. | |
800 | .IP [2] | |
801 | M. E. Lesk, | |
802 | .I | |
803 | Tbl \(em A Program to Format Tables, | |
804 | .R | |
805 | Bell Laboratories Computing Science Report no. 45. | |
806 | .IP [3] | |
807 | B. W. Kernighan, | |
808 | .I | |
809 | A Troff Tutorial, | |
810 | .R | |
811 | Bell Laboratories, 1976. | |
812 | .IP [4] | |
813 | J. F. Ossanna, | |
814 | .I | |
815 | Nroff\|/Troff Reference Manual, | |
816 | .R | |
817 | Bell Laboratories Computing Science Report no. 51. | |
818 | .IP [5] | |
819 | K. Thompson and D. M. Ritchie, | |
820 | .I | |
821 | UNIX Programmer's Manual, | |
822 | .R | |
823 | Bell Laboratories, 1978. | |
824 | .1C | |
825 | .SH | |
826 | .ce | |
827 | Appendix A | |
828 | .ce | |
829 | List of Commands | |
830 | .ft R | |
831 | .TS | |
832 | expand; | |
833 | l2 l5 l2 l. | |
834 | 1C Return to single column format. LG Increase type size. | |
835 | 2C Start double column format. LP Left aligned block paragraph. | |
836 | AB Begin abstract. | |
837 | AE End abstract. | |
838 | AI Specify author's institution. | |
839 | AU Specify author. ND Change or cancel date. | |
840 | B Begin boldface. NH Specify numbered heading. | |
841 | DA Provide the date on each page. NL Return to normal type size. | |
842 | DE End display. PP Begin paragraph. | |
843 | DS Start display (also CD, LD, ID). | |
844 | EN End equation. R Return to regular font (usually Roman). | |
845 | EQ Begin equation. RE End one level of relative indenting. | |
846 | FE End footnote. RP Use released paper format. | |
847 | FS Begin footnote. RS Relative indent increased one level. | |
848 | SG Insert signature line. | |
849 | I Begin italics. SH Specify section heading. | |
850 | SM Change to smaller type size. | |
851 | IP Begin indented paragraph. TL Specify title. | |
852 | KE Release keep. | |
853 | KF Begin floating keep. UL Underline one word. | |
854 | KS Start keep. | |
855 | .TE | |
856 | .sp | |
857 | .ce | |
858 | .ft B | |
859 | Register Names | |
860 | .ft R | |
861 | .PP | |
862 | The following register names are used by \-ms internally. | |
863 | Independent use of these names in one's own macros may | |
864 | produce incorrect output. | |
865 | Note that no lower case letters are used in any \-ms internal name. | |
866 | .TS | |
867 | expand; | |
868 | c s s s s s s s s s s | |
869 | l l l l l l l l l l l. | |
870 | Number registers used in \-ms | |
871 | : DW GW HM IQ LL NA OJ PO T. TV | |
872 | #T EF H1 HT IR LT NC PD PQ TB VS | |
873 | .T FC H2 IF IT MF ND PE PS TC WF | |
874 | 1T FL H3 IK KI MM NF PF PX TD YE | |
875 | AV FM H4 IM L1 MN NS PI RO TN YY | |
876 | CW FP H5 IP LE MO OI PN ST TQ ZN | |
877 | .TE | |
878 | .sp | |
879 | .TS | |
880 | expand; | |
881 | c s s s s s s s s s s | |
882 | l l l l l l l l l l l. | |
883 | String registers used in \-ms | |
884 | \(fm A5 CB DW EZ I KF MR R1 RT TL | |
885 | \(ga AB CC DY FA I1 KQ ND R2 S0 TM | |
886 | ^ AE CD E1 FE I2 KS NH R3 S1 TQ | |
887 | ~ AI CF E2 FJ I3 LB NL R4 S2 TS | |
888 | : AU CH E3 FK I4 LD NP R5 SG TT | |
889 | , B CM E4 FN I5 LG OD RC SH UL | |
890 | 1C BG CS E5 FO ID LP OK RE SM WB | |
891 | 2C BT CT EE FQ IE ME PP RF SN WH | |
892 | A1 C D EL FS IM MF PT RH SY WT | |
893 | A2 C1 DA EM FV IP MH PY RP TA XD | |
894 | A3 C2 DE EN FY IZ MN QF RQ TE XF | |
895 | A4 CA DS EQ HO KE MO R RS TH XK | |
896 | .TE | |
897 | .ne 4i | |
898 | .br | |
899 | .ne 5i | |
900 | .ta 1i 2i 3i 4i | |
901 | .vs .6i | |
902 | .nf | |
903 | .in 1i | |
904 | .ll 4.2i | |
905 | .ce | |
906 | Order of Commands in Input | |
907 | ||
908 | RP | |
909 | TL | |
910 | AU | |
911 | AI | |
912 | AB | |
913 | AE | |
914 | ||
915 | NH, SH | |
916 | PP, LP | |
917 | text ... | |
918 | .br | |
919 | .ce | |
920 | Figure 1 | |
921 | .fi | |
922 | .in 0 |