1 10/20/86 format_document, fdoc
2
3 Syntax as a command: fdoc path -control_args
4
5
6 Function: formats text segments.
7
8
9 Arguments:
10 path
11 is the pathname of an input segment or multisegment file. The
12 suffix fdocin must be the last component of the entryname; however
13 the suffix need not be supplied in the command line.
14
15
16 Control arguments:
17 -hyphenate n, -hph n
18 changes the hyphenate mode from off to on. N is the length of the
19 smallest separated word part; its default value is 2. Default is
20 off
21 -indent n, -ind n
22 indents the output n spaces from the left margin. This space is in
23 addition to any indention established by the usage of the indent
24 control line within the text of the input file.
25 -no_hyphenate, -nph
26 changes the hyphenate mode to off. Default
27
28
29 -output_file path, -of path
30 directs the output to a file instead of to the user's terminal. If
31 path is not given, then the output is written to an output file
32 whose name is formed by replacing the fdocin suffix of the input
33 file entry name with the fdocout suffix. Default is off.
34 -page_numbers, -pgno
35 ends each page with two blank lines and a centered page number.
36 Default is off.
37
38
39 List of control lines:
40 .alb; align-both, format break
41 align the text at both the left and right margins as adjusted by
42 the indention values. Filling must be enabled for this alignment
43 to operate. If filling is disabled, .alb has the effect of .all.
44 This is the default alignment mode.
45 .all; align-left, format break
46 align the text on the left margin as adjusted by the left
47 indention value. Filling has no effect on this alignment.
48 .brf; break-format, format break
49 finish the current output line by formatting any pending text as
50 a short line.
51 .brp; break-page, page break
52 finish the current page, formatting any pending text as a short
53 line.
54
55
56 .fif; fill-off, format break
57 disable filling and retain lines in the output file as they are
58 in the input file no matter how long or short.
59 .fin; fill-on, format break
60 enable filling and restructure the input file lines to the
61 current line length for the output file by taking a word or words
62 from the next line in order to fill the line as close as possible
63 to the current line length. If a line in the input file is
64 longer than the current line length, move a word or words to the
65 next line, etc. See the description of the .alb and .all
66 control lines. Default
67
68
69 .hy; hyphenate-default, no break
70 enable hyphenation according to the initial default and syllable
71 size as set with the -hyphenate control argument for this
72 invocation of the Formatter. If no syllable size is given with
73 the control argument, then the default size is used. If the
74 control argument is not given, then the initial default is off.
75 The default syllable size is 2.
76 .hyf; hyphenate-off, no break
77 disable hyphenation.
78
79
80 .hyn #; hyphenate-on, no break
81 enable hyphenation and set the syllable size according to the
82 given parameter. The parameter is given as an unsigned integer
83 and specifies the number of characters in the smallest allowed
84 hyphenated syllable. If the parameter is not given, then the
85 default syllable size is used. The default syllable size is the
86 size given with the -hyphenate control argument for this
87 invocation of the Formatter. If no size is given with the
88 control argument or the control argument is not given the
89 default syllable size is 2.
90
91
92 .in n, .inl n; indent-left, format break
93 set the indention for the left margin according to the value of
94 the parameter. The default value is 0.
95 If it is given as an unsigned number, set the indention to the
96 value given.
97 If it is given as a signed number, change the indention by the
98 amount given.
99
100
101 .pdl n; page-define-length, no break
102 sets the page length. If n is given with a plus or minus sign,
103 then n is added to or subtracted from the current page length.
104 If n is given without a plus or minus sign, the page length is
105 changed to n. The format_document command inserts blank lines at
106 the top and bottom of each page, so be careful not to set the
107 page length to a value less than 13 or less than 14 if you are
108 having page numbers printed. An error message is displayed if a
109 page length of less than the required lines is given. The
110 default page length is 66 lines.
111
112
113 .pdw n; page-define-width, no break
114 sets the page width line length. If n is given with a plus or
115 minus sign, then n is added to or subtracted from the current
116 line length. If n is given without a plus or minus sign, the
117 line length is changed to n. An error message is displayed if
118 the set line length does not accommodate the input file. The
119 default page width is 65 characters. Finish the current output
120 line and then add the given amount of white space to the current
121 block. The default value for the parameter is 1. If the white
122 space is at the beginning of the text block and the text block is
123 placed at the top of the page or column, then the space is
124 trimmed.
125
126
127 .spf #; space-format, format break
128 finish the current output line and then add the given amount of
129 white space to the current block. The default value for the
130 parameter is 1. If the white space is at the beginning of the
131 text block and the text block is placed at the top of the page or
132 column, then the space is trimmed.
133 .un n, .unl n; undent-left, format break
134 adjust the indention for the left margin for the next output line
135 only according to the value of the parameter. The default value
136 for the parameter is the current value of the left indention.
137 Positive or unsigned values of the parameter move the text
138 outward; negative values move it inward.
139
140
141 Notes: This command takes an input file that you have created using a
142 text editor, formats that file, and either displays it on your terminal
143 or writes it to a new file with a unique name. To direct
144 format_document to perform certain actions, place special control lines
145 in the input file. All control lines begin with a period and must be
146 on a line by themselves. This command makes two assumptions about how
147 the document is to be formatted: it assumes that the output is to be
148 on standard-sized paper with 66 lines per page and lines 65 characters
149 wide these values represent an 8 1/2 by 11 inch page with one-inch
150 margins all around and that both the left and right margins are
151 justified.
152
153
154 Output lines are built by the embedded control lines within the input
155 file being formatted; these input control lines do not appear in the
156 output.