OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / gnumaniak / original / man1 / fmt.1
1 .\" You may copy, distribute and modify under the terms of the LDP General
2 .\" Public License as specified in the LICENSE file that comes with the
3 .\" gnumaniak distribution
4 .\"
5 .\" The author kindly requests that no comments regarding the "better"
6 .\" suitability or up-to-date notices of any info documentation alternative
7 .\" is added without contacting him first.
8 .\"
9 .\" (C) 2002 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
10 .\"
11 .\"     GNU fmt man page
12 .\"     man pages are NOT obsolete!
13 .\"     <ragnar@ragnar-hojland.com>
14 .TH FMT 1 "7 October 2002" "GNU textutils 2.1"
15 .SH NAME
16 \fBfmt\fR \- reformat paragraph text
17 .SH SYNOPSIS
18 .B fmt
19 .RB [ \-ctsu "] [" -\fIWIDTH\fR "] [" "\-p \fIREFIX\fR" "] [" "\-w \fIWIDTH\fR" ]
20 .RB [ \-\-crown\-margin ]
21 .RB [ \-\-split\-only ]
22 .RB [ \-\-tagged\-paragraph ]
23 .RB [ \-\-uniform\-spacing ]
24 .RB [ "\-\-prefix=\fIPREFIX\fR" ] 
25 .RB [ "\-\-width=\fIWIDTH\fR" ]
26 .RI [ FILE... ]
27
28 .BR fmt " [" \-\-help "] [" \-\-version ]
29 .SH DESCRIPTION
30 .B fmt
31 inserts and removes newlines to produce output lines of (at most) a
32 given number of characters (75 by default).  \fBfmt\fR reads from the
33 specified
34 .I FILE
35 arguments (or from standard input if none is given) and writes to standard
36 output.
37
38 By default, blank lines, spaces between words, and indentation are
39 preserved in the output; successive input lines with different
40 indentation are not joined; tabs are expanded on input and introduced on
41 output.
42
43 \fBfmt\fR prefers breaking lines at the end of a sentence, and tries to
44 avoid line breaks after the first word of a sentence or before the last
45 word of a sentence.  A "sentence break" is defined as either the end of
46 a paragraph or a word ending in any of `.?!', followed by two spaces or
47 end of line, ignoring any intervening parentheses or quotes.  Like
48 \fBTeX\fR(1), \fBfmt\fR reads entire "paragraphs" before choosing line
49 breaks; the algorithm is a variant of that in "Breaking Paragraphs Into
50 Lines" (Donald E. Knuth and Michael F. Plass, Software--Practice and
51 Experience', 11 (1981), 1119-1184).
52 .SH OPTIONS
53 .TP
54 .B \-c, \-\-crown\-margin
55 "Crown margin" mode: preserve the indentation of the first two
56 lines within a paragraph, and align the left margin of each
57 subsequent line with that of the second line.
58 .TP
59 .B \-p \fIPREFIX\fB, \-\-prefix=\fIPREFIX
60 Only lines beginning with \fIPREFIX\fR (possibly preceded by whitespace)
61 are subject to formatting. The \fIPREFIX\fR and any preceding whitespace
62 are stripped for the formatting and then re-attached to each
63 formatted output line.  One use is to format certain kinds of
64 program comments, while leaving the code unchanged.
65 .TP
66 .B \-s, \-\-split\-only
67 Split lines only.  Do not join short lines to form longer ones.
68 This prevents sample lines of code, and other such "formatted"
69 text from being unduly combined.
70 .TP
71 .B \-t, \-\-tagged\-margin
72 "Tagged paragraph" mode: like crown margin mode, except that if
73 indentation of the first line of a paragraph is the same as the
74 indentation of the second, the first line is treated as a one-line
75 paragraph.
76 .TP       
77 .B \-u, \-\-uniform\-spacing
78 Uniform spacing.  Reduce spacing between words to one space, and
79 spacing between sentences to two spaces.                    
80 .TP
81 .B \-\fIWIDTH\fB, \-w \fIWIDTH\fB, \-\-width=\fIWIDTH
82 Fill output lines up to \fIWIDTH\fR characters (default 75).  \fBfmt\fR
83 initially tries to make lines about 7% shorter than this, to give
84 it room to balance line lengths.
85 .TP
86 .B "\-\-help"
87 Print a usage message on standard output and exit successfully.
88 .TP
89 .B "\-\-version"
90 Print version information on standard output then exit successfully.
91 .SH NOTES
92 Report bugs to bug-textutils@gnu.org.
93 .br
94 Man page by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>