User Commands          Last change: March 11 1999          tal(1)


NAME
     tal - aligns characters at the ends  of  lines  horizontally
     (e.g. box repair)

SYNOPSIS
     tal  [-fhiv]  [-c char]  [-e str]  [-k column]   [-l length]
     [-m maxalign] [-p padding] [-t tabs] [infile [outfile]]

DESCRIPTION
     tal is a text filter that reads in a  number  of  lines  and
     tries  to  determine  an ending that all those lines have in
     common. Those common trailing characters (from now on called
     a  'trailer')  are  subsequently  aligned,  so that they all
     begin and end on the same column of text.
     This is  useful  to  repair  'broken  boxes'  or  align  the
     backslashes on long macro definitions in C programs. But for
     that matter, tal will work on any  kind  of  common  ending.
     tal  is  especially  useful  as a filter for the vim(1) text
     editor.

OPTIONS
     Options offered by tal are the following:

     -c char
           Change the 'fill character'.  The  fill  character  is
           used  to  fill the entire space between the end of the
           text and the start of the trailer in order to move the
           trailer  to  the  right.  The  fill character does not
           affect trailer detection. The factory default  for  -c
           is ' ' (space).

     -e string
           Explicit   trailer   specification.   This   basically
           unnecessary  option  was  included by popular request.
           The regular tal options such as -l (ell)  and  -f  are
           useful  for  directing the trailer auto-detection pro-
           cess. Ordinarily, you would want  to  stick  with  the
           auto-detection, because it provides a general solution
           without restricting tal to specific trailers. However,
           in  certain  situations it may be desirable to specify
           the trailer directly.  -e disables the  auto-detection
           and thus overrides -l (ell) and -f.

     -f    Force preferred trailer length. This makes tal  choose
           the most frequent trailer of exactly the length speci-
           fied with -l (ell).  -l (ell)  alone  would  choose  a
           shorter  trailer, if the shorter trailer was more fre-
           quent. In a nutshell, if -l (ell) doesn't  perform  as
           expected,  add -f. The factory default for -f is 'off'
           (do not force).

     -h    Print usage information. This also shows  the  default
           settings for all options as compiled into the particu-
           lar binary.

     -i    Ignore case when matching trailers. This takes  effect
           when auto-detecting a trailer as well as when matching
           an explicitly specified trailer.  Trailer  capitaliza-
           tion  is  unified on output. A particular spelling may
           be enforced with -e. The factory  default  for  -i  is
           'off' (be case sensitive).

     -k uint
           Ending column. This tells  tal  to  make  the  aligned
           lines  end  at exactly the given column. If not speci-
           fied, the trailers will be positioned as close to  the
           text  as  possible.  A  value  of  0 (zero) turns this
           option off. The factory default for -k is 0 (zero).

     -l uint
           (ell)  Preferred  trailer  length.  By  default,   tal
           chooses  the longest possible trailer with the highest
           frequency. The "trailer frequency" is  the  number  of
           lines  containing  the  trailer.  The  -l (ell) option
           specifies the preferred trailer length. Its main func-
           tion  is to choose one trailer out of many of the same
           frequency. It will not be honored if a trailer of dif-
           ferent  length  is more frequent (see -f). -l (ell) is
           useful for increasing the chance of frequent  trailers
           such  as  '*/'  to  be  actually  chosen.  The factory
           default is 0 (zero), which turns this option off.

     -m uint
           Maximum alignment column. Specifies the maximum length
           at  which  lines still look okay. The idea behind this
           is that a printout or computer screen  provides  space
           for a limited line length only. Longer lines will fold
           or be cut. Specify the length of your  lines  with  -m
           and  tal will make sure the aligned trailers are posi-
           tioned before the specified column. This  is  achieved
           by  simply  not  performing trailer alignment on lines
           which would become too long.  For  program  code,  the
           author uses a value of 87 because his printouts are 87
           characters wide. People set this to  other  values  if
           their  screen sizes or printout widths differ. A value
           of 0 (zero) disables this feature. The factory default
           for -m is 0 (zero).

     -p uint
           Padding. The number of  fill  characters  inserted  in
           front  of  the  trailers.  A value of 3 would make tal
           place the trailers three characters away from the  end
           of the text. The factory default for -p is 1.

     -t uint
           Distance between tab stops. It is important that  this
           value  is  set correctly, or tabulator characters will
           upset the alignment. The correct value for -t  depends
           on  the settings used for the text you are processing.
           Usually, a value of 8  should  be  okay.  The  factory
           default for -t is 8.

     -v    Print out current version number.

     The "factory defaults" for options as given  above  are  the
     author's  default settings. The default values compiled into
     the actual binary may differ.  Please run 'tal -h'  for  the
     actual default values.

     Some of the options might conflict with each other if speci-
     fied at the same time. So here is the option precedence:

     1. -m is the mightiest option. If it conflicts with  -k,  -k
        is neglected. Padding is added to the line length.

     2. -k overrides the padding, i.e.  -k might reduce the  pad-
        ding for some of the long lines.

     3. -e disables trailer auto-detection and thus overrides  -l
        (ell) and -f.

     Confused? Never mind. It all corresponds pretty much to  the
     expected behavior.

BUGS
     None known.  ;-)
     Should you notice any, please tell the author!

AVAILABILITY
     tal is available from  its  World  Wide  Web  home  page  at
     http://home.pages.de/~jensen/tal/.   The   Web   page   also
     features a number of examples illustrating this manual page.

     Check out the vim(1) home page at www.vim.org!

AUTHOR
     tal was made by Thomas Jensen.
     Please see the tal Web page for a current email address.

VERSION
     This is tal version 1.9.

SEE ALSO
     indent(1) , vim(1)

