FF(1)                       UNIX User's Manual             February 7, 1987

NAME
     ff - fast text formatter

USAGE
     ff [options] [-] [files]

DESCRIPTION
     _f_f is a simple text formatter for flexible uniform formatting of input
     files.  Program options are used to control formatting.  This is in
     contrast to text formatters like _n_r_o_f_f (_1) that require special format
     requests to be part of their input files.  Besides avoiding cryptic
     format requests in text, _f_f is considerably faster than traditional
     formatters like _n_r_o_f_f (_1) and even simple formatters like _f_m_t (_1).

     The most complicated concept with _f_f is that of a line break.  A line
     break causes an interruption in the filling (evening out of the text
     lines).  Line breaks occur when special characters are seen at the
     beginnings of lines, or when all lines are broken.  By default, any
     non-alphanumeric character will cause a break, but this can be
     controlled with the -B option.  A blank line always causes a break.

OPTIONS
     There are many, many options to allow control of indentation, line
     width, line spacing, filling, pagination with headers and footers,
     line numbering, right justification, and perhaps some other things.
     They have extensive type and range checking that produces diagnostic
     error messages, so warnings of obviously wrong options will not be
     discussed here.  In general, options that imply the use of others work
     the way they should; if the page size is set, then pagination is
     automatically assumed.  Some combinations of options give impressive,
     even artistic, effects.  Making a small text file and playing with it
     is the easiest way to learn how the options interact.

     -b   Break all lines of text.  That is, don't even-out lines by
          filling.  By default, text lines are filled.

     -B breakchars
          Change the set of characters that cause line breaks at the start
          of lines to _b_r_e_a_k_c_h_a_r_s. By default, any characters but letters
          and numbers cause a break.  A good choice for break characters
          might be "*-+" and TABS that might be used for lists.

     -c   Center all lines of text.  This option stops all filling of text.

     -d   Delete white space at the beginning and end of lines.  This
          option is useful to help un-format text to be re-formatted.

     -D   Delete empty input lines.  An input line is empty if it has no
          characters, not even invisible character like tabs or spaces.
          This option can be combined with the option to remove white space
          to delete visibly blank lines.

     -f footer
          Set the page footer to the title-string _f_o_o_t_e_r. The default page
          footer is blank.  Titles can be any string, but if the first
          character is not a letter or a digit, but a punctuation character
          like /, then that character separates the left, center, and right
          fields of a title.  For example, the title
                            "/ff: fast formatter/#/1985/"
          would have "ff: fast formatter" as a left justified field and
          1985 as a right justified field on each page.  The page number,
          within the input file, would be centered in the title.  There are
          two special characters, # and *, that respectively are variables
          for the page number in a file and the input file name.  The
          global page number, which is not reset for each file, is ##.
               There is a whole language that allows you to insert
          information about the file being printed.  You can see online
          help for this language by running the command:
                                     echo | ff -f %?
          It is a complicated language, but you can avoid it by avoiding
          the percent (%) character in titles.

     -F footersize
          Set the number of blank lines at the bottom of the page.  The
          footer, if any, is placed in the middle of the space, which by
          default, is five lines.  If _f_o_o_t_e_r_s_i_z_e is 0, no footer will be
          printed.

     -h header
          Set the page header.  See the description of three-part titles
          for the -f footer option.  The default page header is
                                "|File: *||Page: #|".

     -H headersize
          See the description of the footer size.

     -i indent
          Set the indentation of the text to _i_n_d_e_n_t spaces.  Note that this
          effectively reduces the usable width of the page.

     -I tempindent
          Set the temporary indent.  This causes filled text found
          immediately after a break to be indented for one line.  It is
          useful for indenting the first lines of paragraphs.  If
          _t_e_m_p_i_n_d_e_n_t is negative, the the temporary indent will be relative
          to the current _i_n_d_e_n_t value.  If the _t_e_m_p_i_n_d_e_n_t value is more
          negative than the _i_n_d_e_n_t value is positive, _f_f will automatically
          increase _i_n_d_e_n_t.

     -j   Justify the text.  That is, even the right margin by inserting
          spaces in the line.  Only filled text can be justified.

     -n   Number all output lines produced by the input text.  Lines from
          multiple line spacing or pagination will not be numbered.

     -N numberwidth
          Set the width of the line numbers.  The default is to take up 4
          spaces.  Note that this effectively reduces the usable part of
          the page.

     -O   Print a summary of all the options and stop.

     -p   Paginate the output.  See the options for page header and footer
          control.

     -P pagesize
          Set the number of lines in a page to _p_a_g_e_s_i_z_e. By default, the
          standard 66 line page is assumed.

     -s spacing
          Set the line spacing.  By default, text is single spaced (_s_p_a_c_i_n_g
          equals 1).

     -t tab
          Set individual absolute and relative tab stops.  These values
          tell the formatter where to put the text (from an unfilled line)
          that follows a tab character.  Each tab stop is supplied with its
          own -t option; there is no way to bundle them.  _t_a_b values can be
          integers without a plus sign.  These are _a_b_s_o_l_u_t_e tab settings;
          the tabs go to that position.  The values must increase
          monotonically.  If a _t_a_b value is preceded by a plus sign, then
          it is interpreted _r_e_l_a_t_i_v_e to the previous tab setting.  For
          example, a tab setting of 40 followed by one of +20 will set the
          second tab stop to 60.

     -T tabs
          Set tab stops to every _t_a_b_s spaces.  It is useful to get equally
          spaced tabs.  This option cannot be used with the other tab
          setting option.

     -u   Print All Input Text As Initial Upper-Case Titles, Like This
          Sentence.  This option goes well with the one for centering
          lines.

     -w width
          Set the page width.  By default, the page width is 72 characters.
          Note that the usable line length is sometimes less than the page
          width.  If line numbering or indentation is requested, these
          subtract from the line length.

EXAMPLES
     Some of these examples can make shell scripts or aliases.

     Centered Titles: title
          ff  -dcu  $*
     Double Spaced Unfilled Paginated indented (for editing): draft
          ff  -s 2  -b  -p  -f "`date`"  -i 8  $*
     Program Listing: cpr
          H="@        Dir: `pwd`@@File: *@"
          F="@        $NAME@`date`@Page #@"
          ff  -b  -N 8  -H 3  -h "$H"  -F 3  -f "$F"  -T 4  -w 79  -i 2  $*
     Reformat Paragraphed Text: nr
          ff  -jd  -I 5  -i 10  -w 65  -B "TAB SP'*.@"  $*

DIAGNOSTICS
     Some options are incompatible with others.  For example, centered text
     cannot be right-justified.  _f_f will not allow inconsistent
     combinations of options.

SEE ALSO
     fmt(1), nroff(1), scribe(1w)

AUTHOR
     Gary Perlman (with help from many students)

STATUS
     Pretty well tested.
