[OS X TeX] hyphenation in longtable
Chabot Denis
chabotd at globetrotter.net
Tue Feb 13 22:51:36 EST 2007
Hi Bruno,
Le 07-02-13 à 20:00, TeX on Mac OS X Mailing List a écrit :
> That's a classical problem due to the way tables are constructed in
> LaTeX. It's not connected with \multicolumn.
>
> Tables in LaTeX (i.e. the tabular environment) are constructed by
> setting the space between rows to 0, and inserting a \strutbox in
> each row, where \strutbox is reset by each size-changing command to
> have a height of 0.7 times the normal baselineskip and a depth of 0.3
> times that baselineskip. From latex.ltx:
>
> \def\set at fontsize#1#2#3{%
> [...]
> \setbox\strutbox\hbox{%
> \vrule\@height.7\baselineskip
> \@depth.3\baselineskip
> \@width\z@}
>
> When the content of a row has smaller height and depth than the
> \strutbox, this box takes over and sets the space between rows,
> yielding evenly spaced rows.
>
> When, as in your case, row entries are taller or deeper than
> \strutbox, then the space between rows is adjusted to make room for
> these entries. However, any space added by \\[some-space] is added
> with respect to the \strutbox, not with respect to the actual row
> content. Hence, in your case where the row entries are exceedingly
> deep, the 15pt-deep space added to the \strutbox by \\[15pt] is
> buried within these entries.
>
> You can easily check this: because of the p{} column specifiers,
> which creates top-aligned paragraphs, each table element has the same
> height as the \strutbox and an exceedingly large depth. Replace the p
> {} specifiers by b{}, you'll get bottom-aligned paragraphs yielding
> table elements with the same depth as \strutbox and exceedingly large
> height, and suddenly the effect of \\[15pt] will be seen.
>
> Two ways to solve this (while keeping the p{} column specifiers):
>
> - The standard LaTeX way: adjust the \arraystretch parameter, which
> is a multiplicative factor multiplying the interrow space (actually
> it multiplies the height and depth of \strutbox), until that space
> becomes larger than the depth of each table element. I don't like
> this way of proceeding, as you need to proceed by trial-and-error and
> the final result will in no case be a specified fixed space of 15pt
> between the content of the two successive rows.
>
> - The original TeX way: use \noalign, namely replace \\[15pt] by \\
> \noalign{\vspace{15pt}}. \noalign{} does really what you expected \\
> [] to do, namely add a fixed space between successive rows, whatever
> the height and depth of each element of the rows and whatever the
> \strutbox.
>
> Hope this helps and is not too convoluted to follow,
>
> Bruno Voisin
I think I followed, and I am happy to have a reason for the seemingly
strange behavior.
I am also glad for your solutions. However, because I had access to
this command through the booktabs package, addlinespace was an easy
way to solve my problem. As it turned out, addlinespace by itself was
good enough, but you can specify the height you want if you need to.
Again, thank you for a very nicely written explanation.
au revoir,
Denis
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list