[NTG-context] Auto width and height on table cells

Hans Hagen j.hagen at xs4all.nl
Thu Jun 30 09:36:07 CEST 2022


On 6/30/2022 9:22 AM, Angel M Alganza via ntg-context wrote:
> Hi Henning,
> 
> On Thu, Jun 30, 2022 at 09:02:28AM +0200, Henning Hraban Ramm via 
> ntg-context wrote:
> 
>> They’re also tedious, because you can’t setup rows/columns in advance 
>> (like \setupTABLE) – or did that change?
> 
> I'm afraid you're right.
You're joking right? SInce when can one not set up something in some 
context subsystem? Why would I make a table mechanism with no presets?


\starttext
\setupxtable[suffix][align=middle,foregroundcolor=red]
\setupxtable[blabla][foregroundstyle=slanted]
\setupxtable[crap]  [foregroundcolor=blue]
\setupxtable[bold]  [crap][foregroundstyle=bold]

\startxtable[frame=off]
     \startxtablehead
         \startxrow[bold]
             \startxcell[suffix] a 0 \stopxcell
             \startxcell[blabla] a 1 \stopxcell
             \startxcell         a 2 \stopxcell
         \stopxrow
     \stopxtablehead
     \startxtablebody
         \startxrow \startxcell[suffix][ny=2] a 1 \stopxcell \startxcell 
b 1 \stopxcell \startxcell c 1 \stopxcell \stopxrow
         \startxrow                                          \startxcell 
b 2 \stopxcell \startxcell c 2 \stopxcell \stopxrow
         \startxrow \startxcell[suffix]       a 3 \stopxcell \startxcell 
b 3 \stopxcell \startxcell c 3 \stopxcell \stopxrow
         \startxrow \startxcell[suffix]       a 4 \stopxcell \startxcell 
b 4 \stopxcell \startxcell c 4 \stopxcell \stopxrow
         \startxrow \startxcell[suffix]       a 5 \stopxcell \startxcell 
b 5 \stopxcell \startxcell c 5 \stopxcell \stopxrow
     \stopxtablebody
\stopxtable
\stoptext

It's just more symbolic than in natural tables (which is better 
performance wise). I'm pretty sure it's mentioned in some manual.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list