[NTG-context] Table column width on spanned cells

nico nicolas.marsgui at libertysurf.fr
Mon Apr 17 20:32:41 CEST 2006


On Mon, 17 Apr 2006 14:32:39 +0200, Hans Hagen <pragma at wxs.nl> wrote:

> nico wrote:
>> Hello,
>>
>> In the following example using the "nc" option, the 3 middle columns  
>> don't
>> fit the width option. It seems that the table tries to fit to the page
>> width instead.
>>
>> \starttext
>>
>> \bTABLE[frame=on,width=3em]
>> \bTR \bTD[nc=2] A \eTD \bTD x \eTD \bTD[nc=2] B \eTD \eTR
>> \bTR \bTD X \eTD \bTD[nc=3] C \eTD \bTD x \eTD \eTR
>> \bTR \bTD[nc=2] D \eTD \bTD x \eTD \bTD[nc=2] E \eTD \eTR
>> \eTABLE
>>
>> \stoptext
>>
> there is probably a good reason for that (but forgot what),
>
> \squeezeTBLspanfalse
>
> will give you a different result;

Yes, thanks, it works fine for me.

> a possible patch is:
>
> \newif\ifautosqueezeTBLspan \autosqueezeTBLspantrue % NEW
> [...]
>
> but i'm not sure if it will not break other situations, so please do  
> some harsh testing

No need for deep testing :-) Any table without a width option fails.

Example:
\bTABLE[frame=on]
\bTR \bTD A \eTD \bTD x \eTD \bTD B \eTD \eTR
\eTABLE

! Missing number, treated as zero.
<to be read again>
                    f
\v!fit ->f
           it
\doifdimensionelse ...mensionelse \scratchdimen #1
                                                   pt\relax
<argument> ...pan \doifdimensionelse \tbltblwidth
                                                   \donefalse \donetrue  
\else...

\secondoftwoarguments #1#2->#2

\handleTBLcell ... \donetrue \else \donetrue \fi }
                                                   \ifdone \ifnum 0\number  
\g...
...
l.22 \eTABLE

What is the expected benefit of the patch in comparison with switching off  
the squeeze stuff, since I haven't seen yet a side effect of using  
\squeezeTBLspanfalse ?

Regards,
BG


More information about the ntg-context mailing list