blob: 7bdfe25487ab5cd4816dfafe97f0cfec91dee074 [file] [log] [blame]
rsccfa37a72004-04-10 18:53:55 +00001.TH FMT 1
2.SH NAME
3fmt, htmlfmt \- simple text formatters
4.SH SYNOPSIS
5.B fmt
6[
7.I option ...
8]
9[
10.I file ...
11]
12.PP
13.B htmlfmt
14[
15.B -a
16] [
17.B -c
18.I charset
19] [
20.B -u
21.I url
22] [
23.I file ...
24]
25.SH DESCRIPTION
26.I Fmt
27copies the given
28.I files
29(standard input by default)
30to its standard output, filling and indenting lines.
31The options are
32.TP
33.BI -l " n
34Output line length is
35.IR n ,
36including indent (default 70).
37.TP
38.BI -w " n
39A synonym for
40.BR -l .
41.TP
42.BI -i " n
43Indent
44.I n
45spaces (default 0).
46.TP
47.BI -j
48Do not join short lines: only fold long lines.
49.PP
50Empty lines and initial white space in input lines are preserved.
51Empty lines are inserted between input files.
52.PP
53.I Fmt
54is idempotent: it leaves already formatted text unchanged.
55.PP
56.I Htmlfmt
57performs a similar service, but accepts as input text formatted with
58HTML tags.
59It accepts
60.IR fmt 's
61.B -l
62and
63.B -w
64flags and also:
65.TP
66.BI -a
67Normally
68.I htmlfmt
69suppresses the contents of form fields and anchors (URLs and image files); this flag
70causes it to print them, in square brackets.
71.TP
72.BI -c " charset
73change the default character set from iso-8859-1 to
74.IR charset .
75This is the character set assumed if there isn't one
76specified by the html itself in a <meta> directive.
77.TP
78.BI -u " url
79Use
80.I url
81as the base URL for the document when displaying anchors; sets
82.BI -a .
83.SH SOURCE
rscc3674de2005-01-11 17:37:33 +000084.B \*9/src/cmd/fmt.c
rsccfa37a72004-04-10 18:53:55 +000085.PP
rscc3674de2005-01-11 17:37:33 +000086.B \*9/src/cmd/htmlfmt
rsccfa37a72004-04-10 18:53:55 +000087.SH BUGS
88.I Htmlfmt
89makes no attempt to render the two-dimensional geometry of tables;
90it just treats the table entries as plain, to-be-formatted text.