1REFLOW(1) User Contributed Perl Documentation REFLOW(1)
2
3
4
6 reflow - Perl script for reflowing text files using Knuth's
7 paragraphing algorithm.
8
10 reflow < input > output
11
12 reflow file1 file2 ... > output
13
15 Uses Knuth's paragraphing algorithm (as used in TeX) to "reflow" text
16 files by picking "good" places to break the line.
17
18 It takes an ascii text file (with paragraphs separated by blank lines)
19 and reflows the paragraphs. If two or more lines in a row are
20 "indented" then they are assumed to be a quoted poem and are passed
21 through unchanged. (The -skipindented causes ALL indented lines to be
22 passed unchanged)
23
24 The algorithm tries to keep the lines the same length but also tries to
25 break at punctuation, and avoid breaking within a proper name or after
26 certain "connectives" ("a", "the", etc.).
27
28 OPTIONS
29 -skipindented
30 Cause ALL indented lines to be passed unchanged. Normally a single
31 indented line is included in the paragraph, while two or more
32 indented lines are considered to be a quotation or poem and are
33 passed through unchanged.
34
35 -fast
36 Sets the optimum line width to 65 characters. This is the default.
37
38 -slow
39 Tries line widths of 60, 65 and 70 characters and picks the best
40 one.
41
42 -veryslow
43 Tries all line widths between 60 and 70 characters inclusive, and
44 picks the best one. With the -slow and -veryslow options the line
45 widths within a paragraph will vary less, but the line widths may
46 vary from one paragraph to the next.
47
48 -skipto pattern
49 Skip to the first line starting with the given pattern before
50 starting to reflow. This is useful for skipping Project Gutenberg
51 headers or contents tables.
52
53 See Text::Reflow(3) for more options: all the keyword options
54 defined in Text::Reflow are also available via the reflow script.
55
57 Original "reflow" perl script written by Michael Larsen,
58 larsen@edu.upenn.math.
59
60 Modified, enhanced and converted to a perl module with XSUB by Martin
61 Ward, martin@gkc.org.uk
62
64 Text::Reflow(3).
65
66 perl(1).
67
68 See "TeX the Program" by Donald Knuth for a description of the
69 algorithm used.
70
71
72
73perl v5.34.0 2022-01-21 REFLOW(1)