12.4. Default Operation of Requests
nroff/troff initializes the formatting environment.
For example, unless you reset the line length, nroff/troff uses
6.5 inches. Most requests can change the default environment, and
those that can are listed in Table 12-1.
The second column lists
the initial or default value in effect before the request is used.
If no initial value applies, a hyphen (–) is used.
The third column shows the effect if a request's optional argument
is not used. Here, a hyphen is used if the request doesn't accept an
argument or if the argument is required.
Table 12-1. Requests That Affect the Default Environment
| Request | Initial Value | If No Argument | Description |
| .ad | Justify |
Justify | Adjust margins.
|
| .af | Lowercase arabic | – | Assign a format to a register.
|
| .am | – | End call with .. | Append to a macro.
|
| .bd | Off | – | Embolden font.
|
| .c2 | ' | ' | Set no-break control character.
|
| .cc | . | . | Set control character.
|
| .ce | Off | Center one line | Center lines.
|
| .ch | – |
Turn off trap | Change trap position.
|
| .cs | Off | – | Set constant-width spacing.
|
| .cu | Off | One line | Continuous underline/italicize.
|
| .da | – | End the diversion | Divert text and append to a macro.
|
| .de | – | End macro with .. | Define a macro.
|
| .di | – | End the diversion | Divert text to a macro.
|
| .dt | – | Turn off trap | Set a diversion trap.
|
| .ec | \ | \ | Set escape character.
|
| .eo | On | – | Turn off escape character.
|
| .ev | 0 | Previous environment
| Change environment (push down).
|
| .fc | Off | Off | Set field delimiter and pad character.
|
| .fi | Fill | – | Fill lines.
|
| .fp |
1=R
2=I 3=B 4=S |
– | Mount font (on positions 1–4).
|
| .ft | Roman | Previous font | Set font.
|
| .hc | \% | \% | Set hyphenation character.
|
| .hy | Mode 1 |
Mode 1 | Set hyphenation mode.
|
| .ig | – | End with .. | Suppress (ignore) text in output.
|
| .in | 0 | Previous indent | Indent.
|
| .it | – | Turn off trap | Set a trap for input line counting.
|
| .lc | . | None | Set leader character.
|
| .lg |
Off (nroff) On (troff) |
On | Ligature mode.
|
| .ll | 6.5 inches | Previous line length
| Set line length.
|
| .ls | Single-space | Previous mode | Set line spacing.
|
| .lt | 6.5 inches | Previous title length
| Set length of title.
|
| .mc | – | Turn off | Set the margin character.
|
| .mk | – | Internal | Mark vertical position.
|
| .na | Adjust | – | Don't adjust margins.
|
| .ne | – | One vertical line | Keep lines on same page if there's room.
|
| .nf | Fill | – | Don't fill lines.
|
| .nh | On | – | Turn off hyphenation.
|
| .nm | Off | Off | Line-numbering mode.
|
| .nn | – | One line | Don't number next N lines.
|
| .ns | Space mode | – | Enable no-space mode.
|
| .nx | – | End of file | Go to a file.
|
| .pc | % | Off | Set page character.
|
| .pl | 11 inches | 11 inches | Set page length.
|
| .pn | Page 1 | – | Set page number.
|
| .po |
0 (nroff); 26/27 inch (otroff) 1 inch (ditroff)
|
Previous offset | Change page offset.
|
| .ps | 10 | Previous point size
| Set point size.
|
| .rd | – | Ring bell | Read from the terminal.
|
| .rt | – | Internal | Return to marked vertical place.
|
| .sp | – | One vertical line | Output blank spacing.
|
| .ss | 12/36 em | Ignored | Set character spacing.
|
| .sv | – | One vertical line | Save (store) spacing.
|
| .ta | 8 en (nroff); 1/2 inch (troff)
| – | Define tab settings.
|
| .tc | – | – | Set tab repetition character.
|
| .ti | 0 | – | Indent next line. |
| .tm | – | Newline | Print a message, then continue.
|
| .tr | – | – | Translate pairs of characters on output.
|
| .uf | Italic | Italic | Set font for underlining.
|
| .ul | 0 | One line | Underline/italicize. |
| .vs | 1/6 inch (nroff); 12 points (troff)
| Previous value | Set vertical spacing for lines.
|
Comments in nroff/troff begin with \".
Lines beginning with . that contain an unknown request
are ignored. In general, don't put leading whitespace on your text lines.
This causes a break, and nroff and troff
honors the leading whitespace literally.
Note: the canonical reference for nroff/troff is
Bell Labs Computing Science Technical Report #54,
Troff User's Manual,
by J.F. Ossanna and B.W. Kernighan.
It is available in PostScript from
http://cm.bell-labs.com/cm/cs/cstr/54.ps.gz.
You should read it if you plan to do any serious work in
nroff/troff (such as writing or modifying
macro packages).
This document explains the ideas of
diversions,
environments,
fields,
registers,
strings,
and
traps.
 |  |  | | 12.3. Conceptual Overview |  | 12.5. Group Summary of Requests |
Copyright © 2003 O'Reilly & Associates. All rights reserved.
|
|