.TH col "" "" Command
.PC "Remove reverse and half-line motions"
\fBcol \fR[ \fB\-bdfx\fR ][ \fB\-p\fIn \fR]
.PP
.HS
.SH Options:
.IC \fB\-b\fR
Output device cannot backspace
.IC \fB\-d\fR
Double spaced output
.IC \fB\-f\fR
The output device can handle half lines
(has precedence over \fB\-d\fR)
.IC \fB\-p\fIn\fR
Set page buffer to \fIn\fR lines (default, 128)
.IC \fB\-x\fR
Suppress conversion of white space to tabs on output
.HE
The command
.B col
reads the standard input
and writes to the standard output.
It removes reverse and half-line motions from
the output of
.B nroff
for the benefit of output devices that cannot perform them.
It maintains an image of the page in memory and performs
these motions virtually so they do not appear on the output.
.PP
.B col
understands four
escape sequences:
.B "<esc> 7"
for reverse line feed,
.B "<esc> 8"
for half reverse line feed,
.B "<esc> 9"
for half forward line feed,
and
.B "<esc> B"
for a forward line feed.
It removes
.B <esc>
(ASCII 033)
from the input stream if it is followed by any other character.
.PP
Eight control characters besides
.B <esc>
are interpreted by
.BR col .
Newline,
return, space, backspace, and tab carry their usual meaning.
.B VT
(013)
is an alternate form of reverse line feed.
The characters
.B SO
(017)
and
.B SI
(016)
signal the start and end of text in an alternate character set.
.B col
remembers the character set for each character and uses
.B SO
and
.B SI
to distinguish them on the output.
.B col
removes all other control characters from the input stream.
.PP
\fBcol\fR recognizes the following options:
.IP \fB\-b\fR 0.4i
The output device cannot backspace.
Only the last of a set of characters destined for
a given position will appear.
.IP \fB\-d\fR
Double-space the output.
This doubles the length of a document but
preserves relative vertical spacing.
The
.B -f
option has precedence.
.IP \fB\-f\fR
The output device can perform half-forward line feeds.
Full lines appear single spaced with half lines between them.
This is the only situation in which half forward line feeds appear
in the output of
.B col
\(em reverse line motions never appear.
.IP \fB\-x\fR
Suppress the default conversion of white space to tabs on output.
.IP "\fB\-p \fIn\fR"
Set the internal page buffer size to
.I n
full lines (default, 128).
.PP
If neither
.B -f
nor
.B -d
is chosen,
.B col
moves non\-empty half lines to the next lower full line
and pushes all later lines down one line.
This can distort the appearance of the document.
.SH "See Also"
.Xr "ASCII," ascii
.Xr "commands," commands
.Xr "nroff" nroff
.SH Notes
Backing up past the start of a document or of the page buffer loses characters.
