home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeBook TitleSearch this book

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

RequestInitial ValueIf No ArgumentDescription
.adJustify Justify

Adjust margins.

.afLowercase arabic

Assign a format to a register.

.amEnd call with ..

Append to a macro.


Embolden font.


Set no-break control character.


Set control character.

.ceOffCenter one line

Center lines.

.ch Turn off trap

Change trap position.


Set constant-width spacing.

.cuOffOne line

Continuous underline/italicize.

.daEnd the diversion

Divert text and append to a macro.

.deEnd macro with ..

Define a macro.

.diEnd the diversion

Divert text to a macro.

.dtTurn off trap

Set a diversion trap.


Set escape character.


Turn off escape character.


Previous environment

Change environment (push down).


Set field delimiter and pad character.


Fill lines.






Mount font (on positions 1–4).

.ftRomanPrevious font

Set font.


Set hyphenation character.

.hyMode 1 Mode 1

Set hyphenation mode.

.igEnd with ..

Suppress (ignore) text in output.

.in0Previous indent


.itTurn off trap

Set a trap for input line counting.


Set leader character.


Off (nroff)

On (troff)


Ligature mode.

.ll6.5 inches

Previous line length

Set line length.

.lsSingle-spacePrevious mode

Set line spacing.

.lt6.5 inches

Previous title length

Set length of title.

.mcTurn off

Set the margin character.


Mark vertical position.


Don't adjust margins.

.neOne vertical line

Keep lines on same page if there's room.


Don't fill lines.


Turn off hyphenation.


Line-numbering mode.

.nnOne line

Don't number next N lines.

.nsSpace mode

Enable no-space mode.

.nxEnd of file

Go to a file.


Set page character.

.pl11 inches11 inches

Set page length.

.pnPage 1

Set page number.


0 (nroff); 26/27 inch (otroff)

1 inch (ditroff)

Previous offset

Change page offset.


Previous point size

Set point size.

.rdRing bell

Read from the terminal.


Return to marked vertical place.

.spOne vertical line

Output blank spacing.

.ss12/36 emIgnored

Set character spacing.

.svOne vertical line

Save (store) spacing.


8 en (nroff); 1/2 inch (troff)

Define tab settings.


Set tab repetition character.

.ti0Indent next line.

Print a message, then continue.


Translate pairs of characters on output.


Set font for underlining.

.ul0One lineUnderline/italicize.

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.

Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.