[texhax] One (more) question about \halign
bnb at ams.org
Wed Feb 3 22:28:38 CET 2010
from donald arseneau:
> (Actually, for a TOC it is better to use paragraph parameters and no
> boxes or alignments. Then you have to pre-measure your page numbers
> and section numbers, but that is inevitable even with halign because
> you have to set the \hsize.)
Thanks for your suggestion. However, I'm not able to build a TOC structure
otherwise. Can you suggest how to do that with paragraph parameters?
here's a very raw, very plain example.
a chapter number or such can be set
in an \llap'ed box of specified fixed
size on the first line instead of the
negative kerned name on a separate line.
if you do that, you'll want to adjust
the width of the \leftskip to be the
same width as the box.
if you want dot leaders, they can be
used to replace the \hfill on the last
line; you'll want to adjust the width
of the \rlap'ped box to avoid too much
of a gap before the page number. note
that the \hsize is narrower than the
assumed page width.
i heartily recommend ragged right text
i'm sure this isn't exactly what you
want, but you should be able to crib
the idea. see also the texbook,
dirty tricks, p.392 ff., "paragraph
Title of first article\\
Title of second article\\
Title of third article, which is very long and goes
on and on taking up much more than one line\\
More information about the texhax