GNU Info

Info Node: (groff)Leaders

(groff)Leaders


Next: Fields Prev: Tabs and Fields Up: Tabs and Fields
Enter node , (file) or (file)node

Leaders
-------

   Sometimes it may may be desirable to use the `tc' request to fill a
particular tab stop with a given character (for example dots in a table
of contents), but also normal tab stops on the rest of the line.  For
this `gtroff' provides an alternate tab mechanism, called "leaders"
which does just that.

   A leader character (character code 1) behaves similarly to a tab
character: It moves to the next tab stop.  The only difference is that
for this movement, the fill character defaults to a period character and
not to space.

 - Escape: \a
     This escape is a non-interpreted leader character.  In copy mode
     (Note: Copy-in Mode), `\a' is the same as a real leader
     character.

 - Request: .lc [fill-char]
     Declare the leader character.  Without an argument, leaders act the
     same as tabs (i.e., using whitespace for filling).  `gtroff''s
     start-up value is `.'.  The value of this "leader repetition"
     character is associated with the current environment (Note:
     Environments).

   For a table of contents, to name an example, tab stops may be
defined so that the section number is one tab stop, the title is the
second with the remaining space being filled with a line of dots, and
then the page number slightly separated from the dots.


     .ds entry 1.1\tFoo\a\t12
     .lc .
     .ta 1i 5i +.25i
     \*[entry]

This produces


     1.1  Foo..........................................  12


automatically generated by info2www version 1.2.2.9