groff: Leaders
5.10.1 Leaders
--------------
Sometimes it may be desirable to use the 'tc' request to fill a
particular tab stop with a given glyph (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 glyph defaults to a period character and not
to space.
-- Escape: \a
This escape is a non-interpreted leader character. In copy mode
(⇒Copy-in Mode), '\a' is the same as a real leader
character.
-- Request: .lc [fill-glyph]
Declare the "leader repetition character".(1) (⇒
Leaders-Footnote-1) Without an argument, leaders act the same as
tabs (i.e., using whitespace for filling). 'gtroff''s start-up
value is a dot ('.'). The value of the leader repetition character
is associated with the current environment (⇒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