Re: Bad TOC alignment on the right (before the page number)
- From: Vincent Lefevre <vincent+news@xxxxxxxxxx>
- Date: Mon, 25 May 2009 00:40:18 +0000 (UTC)
In article <28f6ee6f-4676-4e18-92d0-44b61baff118@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Dan <luecking@xxxxxxxx> wrote:
This is the behavior of \leaders, the tex command used in
constructing the dotted line. Tex has two other commands:
\xleaders and \cleaders, which also try to fill the space
with copies of a box. If the space is not a whole number of
boxes, something has to be done.
-- \leaders just ignores grid squares that are not entirely in
the space. Thus, the space is not entirely filled with boxes.
-- \xleaders puts equal spaces between every two boxes
(ignoring the grid entirely) so the space is entirely filled
with boxes and space.
-- \cleaders puts equal space before and after the whole
line of boxes (also ignoring the grid) so the whole space
is filled.
OK, thanks for the explanations. If I understand correctly,
I must use \leaders because I want all dots to be aligned (as
usual). So, to have the last dot at the right, I need to:
1. adjust either the text width or the box width so that the
text width in an integer multiple of the box width;
2. redefine the box so that the dot is at the right instead
of the middle.
But how can I modify the box for the TOC?
Since in the book, the tocloft package is used, perhaps I can
change some of its commands. In particular, I see:
\providecommand{\cftdotfill}[1]{%
\leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill}
\providecommand{\cftdotsep}{4.5}
Removing the second "\mkern #1 mu" and multiplying the 4.5 by 2
(giving 9) seems to do what I want, except that I don't know if
the text width is a multiple of the box width.
But this doesn't solve all the problems: for titles that fit on
several lines, how can I control the justification? I currently
get something like:
1.1 A short title . . . . . . . . . . . 3
1.2 A very very very very very very very very
very very very very very very very very
very very very very very very long title . . 3
while I'd want:
1.1 A short title . . . . . . . . . . . 3
1.2 A very very very very very very very very
very very very very very very very very
very very very very very very long title . . 3
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
.
- References:
- Bad TOC alignment on the right (before the page number)
- From: Vincent Lefevre
- Re: Bad TOC alignment on the right (before the page number)
- From: Christian Ebert
- Re: Bad TOC alignment on the right (before the page number)
- From: Vincent Lefevre
- Re: Bad TOC alignment on the right (before the page number)
- From: Dan Luecking
- Re: Bad TOC alignment on the right (before the page number)
- From: Vincent Lefevre
- Re: Bad TOC alignment on the right (before the page number)
- From: Dan
- Bad TOC alignment on the right (before the page number)
- Prev by Date: Re: LuaTeX
- Next by Date: Re: LuaTeX
- Previous by thread: Re: Bad TOC alignment on the right (before the page number)
- Next by thread: Bug fixes: CTAN files givbc10.pfb and etr10.pfb
- Index(es):
Relevant Pages
|