It is for users who find editing neatly formatted files pleasanter than working with files with irregular lines. It knows that lines starting with a period or with an apostrophe should be output as is, and that certain requests and macros start no-fill mode, while others return to fill mode. So, unlike fmt, it will process the following example properly:
Some short lines to be joined, then a table which should be respected: .TS n n. 1 2 3 4 .TE More short lines to be joined.The above will produce:
Some short lines to be joined, then a table which should be respected: .TS n n. 1 2 3 4 .TE More short lines to be joined.
Fmt run on that example would produce:
Some short lines to be joined, then a table which should be respected: .TS n n. 1 2 3 4 .TE More short lines to be joined.
destroying the table.
Fmtr reads the concatenation of input files (or standard input if none are given) and produces on standard output a version of its input with lines as close as possible to 72 characters. This default line length may be modified with the -w (for width) flag. If you specify the -z flag it will peek under a zero width character at the start of a line seeking a command. Fmtr knows about the ms(7) and me(7) macro packages.
Since fmtr knows and respects most formatter constructs, it can be safely used on an entire document, as long as that document does not contain any strange sequences of commands.
There are two ways in which additional macros that start or end no-fill mode may be specified to fmtr. The -s and -e flags can be used to introduce sequences of macros that start and end no-fill mode respectively. Any number of macros, each of which must consist of a period followed by exactly two letters, can be concatenated into a string. So if you are using two macros, .OS and .FS, both of which start no-fill mode, and a corresponding pair, .OE and .FE, which end no-fill mode, you would enter
fmtr -s .OS.FS -e .OE.FE file
For users who regularly use macros of there own, the environmental variables FMTR_S and FMTR_E are taken as strings of macros which start and end no-fill mode. They should be in the same format as the strings used as arguments to the -s and -e flags.