[OS X TeX] hyphenation in longtable

Chabot Denis chabotd at globetrotter.net
Sat Feb 10 22:12:24 CET 2007


Hi Bruno and Peter,

Le 07-02-09 à 20:00, TeX on Mac OS X Mailing List a écrit :

> Subject: Re: [OS X TeX] hyphenation in longtable
> From: "Peter Dyballa" <Peter_Dyballa at Web.DE>
> Date: Fri, 9 Feb 2007 22:22:54 +0100
>
>
> Am 09.02.2007 um 21:37 schrieb Bruno Voisin:
>
>> Le 9 févr. 07 à 20:56, Peter Dyballa a écrit :
>>
>>> Am 09.02.2007 um 20:34 schrieb Chabot Denis:
>>>
>>>> I thought that the instructions to hyphenate (which I never
>>>> issued, happens by default, fortunately) should continue to the
>>>> content of that file, no? So it must be that inside longtable it
>>>> does not happen, at least not automatically.
>>>
>>> In tables hyphenation is disabled – how could TeX compute the
>>> optimal width of a cell? If TeX would hyphenate the words, the
>>> cells would become very narrow and all tables pretty long and
>>> pretty slender.
>>
>> You can get hyphenation in columns of fixed width, using the p
>> specifier (or m, defined by the array package, for a vertically
>> centered cell content). For example p{100mm} or m{100mm}. I cannot
>> be more specific, as I do not have any LaTeX manual at hand right  
>> now.
>>
>> I don't know, though, whether these specifiers are compatible with
>> the longtable environment.
>>
>
> The p{width} form definitely is (I used it a few times) – although
> I've never seen hyphenation happen in it (because /I/ did the breaks
> first?). Even the manual does not show any ...
>
> --
> Greetings
>
>    Pete
I made a few tests. It turns out that because early tests had  
suggested the table cells looked niced in raggedright because cells  
are relatively narrow, I defined my table like this:

\begin{longtable}{>{\raggedright}p{2.8cm} >{\raggedright}p{2.8cm} c
            >{\raggedright}p{3.7cm} c >{\raggedright}p{2.8cm} c
            >{\raggedright}p{2cm} c >{\raggedright}p{2.1cm} cc}

The table formats nicely, but without hyphenation.

If I do this instead:
\begin{longtable}{p{2.8cm} p{2.8cm} c
            p{3.7cm} c p{2.8cm} c
            p{2cm} c p{2.1cm} cc}

I do get hyphenation. In fact, I must have fine-tuned my column  
widths better than in my preliminary tests because my cells with a  
lot of text look allright even with full justification, especially  
that hyphenation does help.

But it would  be nice to understand why asking for raggedright  
columns stopped hyphenation. Is it a normal feature of raggedright  
text in LaTeX?

I have an unrelated question.

I sometimes need to add a bit more space between the bottom of a row  
of cells and the top of next one. I use \\[8pt] and all is well.

Except when the next line starts with \multicolumn.

In that case, there is no extra spacing at all. Is it normal or did I  
do something weird somewhere in my longtable?

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 macostex-archives mailing list