=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/pr/pr.1,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/pr/pr.1 1996/06/26 05:37:53 1.2 +++ src/usr.bin/pr/pr.1 1997/04/23 08:08:31 1.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pr.1,v 1.2 1996/06/26 05:37:53 deraadt Exp $ +.\" $OpenBSD: pr.1,v 1.3 1997/04/23 08:08:31 grr Exp $ .\" Copyright (c) 1991 Keith Muller. .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -50,7 +50,7 @@ .Bk -words .Op Fl Ar column .Ek -.Op Fl adFmrt +.Op Fl adfFmrt .Bk -words .Oo .Op Fl e @@ -109,21 +109,45 @@ \(bu A 5-line trailer consisting of blank lines. .in -2 .Pp -If standard output is associated with a terminal, -diagnostic messages are suppressed until the +Optionally, the trailer can be replaced by a +.Em +where this is more appropriate for the output device being used and +.Em s +can be expanded to input relative +.Em s +or +.Em s +can contracted to output relative +.Em s. +The .Nm pr -utility has completed processing. +utility also interprets +.Em s +in the input as logical end of pages. .Pp When multiple column output is specified, text columns are of equal width. By default text columns are separated by at least one -.Em . -Input lines that do not fit into a text column are truncated. -Lines are not truncated under single column output. +.Em . +Input lines that do not fit into a text column are truncated, except +in the default single columns output mode. +.Pp +If standard output is associated with a terminal, +diagnostic messages are suppressed until the +.Nm pr +utility has completed processing. .Sh OPTIONS .Pp -In the following option descriptions, column, lines, offset, page, and -width are positive decimal integers and gap is a nonnegative decimal integer. +In the following option descriptions, +.Em column , +.Em lines , +.Em offset , +.Em page , +and +.Em width +are positive decimal integers and +.Em gap +is a non-negative decimal integer. .Bl -tag -width 4n .It Ar \&+page Begin output at page number @@ -158,9 +182,13 @@ .It Fl d Produce output that is double spaced. An extra .Em -character is output following every found in the input. +character is output following every +.Em +found in the input. .It Fl e Ar \&[char\&]\&[gap\&] -Expand each input to the next greater column +Expand each input +.Em +to the next greater column position specified by the formula .Ar n*gap+1 , where @@ -185,6 +213,10 @@ sequence of .Em characters. +.It Fl f +Same as the +.Fl F +option. .It Fl h Ar header Use the string .Ar header @@ -192,8 +224,14 @@ .Ar file name in the header line. .It Fl i Ar \&[char\&]\&[gap\&] -In output, replace multiple s with s whenever two or more -adjacent s reach column positions +In output, replace multiple +.Em s +with +.Em s +whenever two or more +adjacent +.Em s +reach column positions .Ar gap+1 , .Ar 2*gap+1 , etc. @@ -210,7 +248,7 @@ character. .It Fl l Ar lines Override the 66 line default and reset the page length to -.Ar lines. +.Ar lines . If .Ar lines is not greater than the sum of both the header and trailer @@ -336,12 +374,66 @@ Error messages are written to standard error during the printing process (if output is redirected) or after all successful file printing is complete (when printing to a terminal). +.Sh NOTES +.Pp +The interpretation of +.Em s +in the input stream is that they are special +.Em s +which have the side effect of causing a page break. While this works +correctly for all cases, strict interpretataion also implies that the +common convention of placing a +.Em +on a line by itself is actually interpreted as a blank line, page break, +blank line. +.Sh RESTRICTIONS +.Pp +The +.Nm pr +utility is intended to paginate input containing basic +.Xr ascii 7 +text formatting and input streams containing non-printing +.Em , +.Em +or long lines may result in formatting errors. +.Pp +The +.Nm pr +utility does not currently understand over-printing using +.Em +or +.Em +characters, and except in the case of unmodified single-column output, +use of these characters will cause formatting errors. +.Sh BUGS +The lack of a line wrapping option, and the specification that truncation +does not apply to single-column output frequently results in formatting +errors when input lines are longer than actual line width of the output device. +.Pp +The default width of 72 is archaic and non-obvious since it is normally +ignored in the default single column mode. Using the +.Fl m +option with one column provides a way to truncate single column output but +there's no way to wrap long times to a fixed line width. +.Pp +The default of +.Em +for the separator for the +.Fl n +and +.Fl s +options often results in lines apparently wider than expected. .Sh SEE ALSO .Xr cat 1 , -.Xr more 1 +.Xr more 1 , +.Xr ascii 7 .Sh STANDARDS The .Nm pr utility is .St -p1003.2 -compatible. +compatible, however that standard is is relatively silent concerning the +handling of input characters beyond the behavior dictated by the +.Nm pr +required command +options.