TeX: Reference and Examples


Sample Record:


:cs    cleaders
:fam0  3
:tbi0  +224, 225--226, @357, @374
:tbi1  224
:bi    1
:use   
:bd    insert centered leaders
:ld Leaders are used to fill space with a box or a rule. Normally,
copies of a box will not completely fill a specified space. So, in
addition to |\leaders|, \tex\ provides two additional ways to put
boxes in the space. The first is |\cleaders|. It packs boxes tightly
together and centers them in the specified space. The second is
|\xleaders|. It breaks the leftover space into equal pieces and puts
one piece between each box and on the left and right ends of the
boxes. The result is a {\it sbsb\ \char144\ sbs} pattern where {\it s}
stands for one of the pieces of space and {\it b} for one of the boxes
\tr{224}.
:see |leaders|, |xleaders|
:lne
:exam \def\sampletocA#1#2%
{
     \setbox0=\hbox to 25pt{\vrule height 0.4pt
                    depth 0pt width 25pt}
     \setbox1=\hbox to 25pt{\vrule\hfil #2}
     \vbox
     {
          \hsize=224pt
          #1\vrule\leaders\copy0\hfill\copy1\par
          #1\vrule\cleaders\copy0\hfill\copy1\par
          #1\vrule\xleaders\copy0\hfill\copy1\par
     }
}
\sampletocA{\noindent}{100}
\sampletocA{Strangers and Brothers}{116}
\sampletocA{The Age of Reason}{178}
:examc The |\vrule| on line 9 prevents the |\leaders| for page 100
from beginning at the left margin.

If the three |\vtop|'s made by the three |\sampletocA| calls appear
too close together, they are. One way to avoid this problem is to use
struts \tr{82}.   

HTML form of above record:

cleadersBox
Command
Synopsis: \cleaders <box or rule><glue>

Description:

Example:

     1. \def\sampletocA#1#2%
     2. {
     3.     \setbox0=\hbox to 25pt{\vrule height 0.4pt
     4.                    depth 0pt width 25pt}
     5.     \setbox1=\hbox to 25pt{\vrule\hfil #2}
     6.     \vbox
     7.     {
     8.          \hsize=224pt
     9.          #1\vrule\leaders\copy0\hfill\copy1\par
    10.          #1\vrule\cleaders\copy0\hfill\copy1\par
    11.          #1\vrule\xleaders\copy0\hfill\copy1\par
    12.     }
    13. }
    14. \sampletocA{\noindent}{100}
    15. \sampletocA{Strangers and Brothers}{116}
    16. \sampletocA{The Age of Reason}{178}
Produces: Not yet implemented.

Comments:

TeXbook References: 224. Also: 224, 225-226, 357, 374

See Also: leaders, xleaders.


TeX form of above record:

\def\CScs{cleaders}%
\def\CSfamily{Box}%
\def\CStbrb{224, 225--226, 357, 374}%
\def\CStbra{224}%
\def\CStype{Command}%
\setbox\CSuse=\hbox{\\}%
\def\CSbdesc{insert centered leaders}%
\setbox\CSldesc=\vbox{\dropcap{-5pt}{L}EADERS are used to fill space
with a box or a rule. Normally, copies of a box will not completely
fill a specified space. So, in addition to |\leaders|, \tex\ provides
two additional ways to put boxes in the space. The first is
|\cleaders|. It packs boxes tightly together and centers them in the
specified space. The second is |\xleaders|. It breaks the leftover
space into equal pieces and puts one piece between each box and on the
left and right ends of the boxes. The result is a {\it sbsb\ \char144\
sbs} pattern where {\it s} stands for one of the pieces of space and
{\it b} for one of the boxes \tr{224}.}%
\def\CSseealso{|leaders|, |xleaders|}%
\setbox\CScomments=\vbox{\fixcomments The |\vrule| on line 9 prevents
the |\leaders| for page 100 from beginning at the left margin.

If the three |\vtop|'s made by the three |\sampletocA| calls appear
too close together, they are. One way to avoid this problem is to use
struts \tr{82}.\par\endgroup}%
\setbox\CSptval=\hbox{}%
\setbox\CSexample=\vbox{\autolinenumber

\beginverbatim
\def\sampletocA#1#2%
{
     \setbox0=\hbox to 25pt{\vrule height 0.4pt
                    depth 0pt width 25pt}
     \setbox1=\hbox to 25pt{\vrule\hfil #2}
     \vbox
     {
          \hsize=224pt
          #1\vrule\leaders\copy0\hfill\copy1\par
          #1\vrule\cleaders\copy0\hfill\copy1\par
          #1\vrule\xleaders\copy0\hfill\copy1\par
     }
}
\sampletocA{\noindent}{100}
\sampletocA{Strangers and Brothers}{116}
\sampletocA{The Age of Reason}{178}
\endverbatim
}%
\setbox\CSproduces=\vbox{\def\sampletocA#1#2%
{
     \setbox0=\hbox to 25pt{\vrule height 0.4pt
                    depth 0pt width 25pt}
     \setbox1=\hbox to 25pt{\vrule\hfil #2}
     \vbox
     {
          \hsize=224pt
          #1\vrule\leaders\copy0\hfill\copy1\par
          #1\vrule\cleaders\copy0\hfill\copy1\par
          #1\vrule\xleaders\copy0\hfill\copy1\par
     }
}
\sampletocA{\noindent}{100}
\sampletocA{Strangers and Brothers}{116}
\sampletocA{The Age of Reason}{178}}%
\mkrefpage

Control Sequence types:
Type Description
cCommand
dDerived Command
iqInternal Quantity
piParameter (integer)
pdParameter (dimen)
pgParameter (glue)
pmParameter (muglue)
ptParameter (token)


Control Sequences in the Box Family:
Control SequenceTypeDescription
badnessiq0-10000 for the badness of glue settings in a box.
boxcput `box contents' in current list and empty the box.
boxmaxdepthpdmaximum possible depth of a vertical box.
cleaderscinsert centered leaders.
copycput `box contents' in current list but do not empty the box.
dpiqdepth of a box.
everyhboxpttokens inserted at the start of every hbox.
everyvboxpttokens inserted at the start of every vbox.
hbadnesspibadness above which bad hboxes are reported.
hboxcconstruct a box holding horizontal material.
hfuzzpdoverrun allowed before overfull hboxes are reported.
hrulecmake a rule in vertical mode.
htiqheight of a box.
lastboxcvoid or last hbox or vbox on current list.
leaderscfill space (specified by glue) with box or rule.
overfullrulepdwidth of rules appended to overfull boxes.
prevdepthiqdepth of last box added to current vertical list.
setboxcassign hbox or vbox to a box register.
unhboxcput `unwrapped hbox contents' in current list and empty the box.
unhcopycput `unwrapped hbox contents' in current list but do not empty the box.
unvboxcput `unwrapped vbox contents' in current list and empty the box.
unvcopycput `unwrapped vbox contents' in current list but do not empty the box.
vbadnesspibadness above which vboxes are reported.
vboxcconstruct a box holding vertical material.
vfuzzpdoverrun allowed before overful vboxes are reported.
vrulecmake a rule box in horizontal mode.
vsplitcremove a specified amount of material from a box register.
vtopcconstruct a box holding vertical material.
wdiqwidth of a box.
xleaderscinsert expanded leaders.


Home

© Copyright 1998-2001, David Bausum. All Rights Reserved.