[NTG-context] Centerd table?

Wolfgang Schuster schuster.wolfgang at googlemail.com
Tue Apr 19 14:10:53 CEST 2011


Am 19.04.2011 um 11:32 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello,
> 
> why this code doesn't give a centered table?
> 
> ---
> 
> \starttext
>  \startalignment[middle]
>    \dontleavehmode
>    \starttable[|c|c|c|]
>      \HL
>      \VL a \VL b \VL c \VL\AR
>      \HL
>      \VL a \VL b \VL c \VL\AR
>      \HL
>    \stoptable
>  \stopalignment
> \stoptext
> 
> ---
> 
> How to achieve it?

\placetable[force,none]{}
  {\starttable[|c|c|c|]
   …
   \stoptable}

When you want less space before and after the table
you can define your own float with reduced spacing.

\definefloat[fixedtable][table]

\setupfloat[fixedtable][spacebefore=,spaceafter=,default={force,none}]

\starttext

\placefixedtable{}
  {\starttable[|c|c|c|]
   …
   \stoptable}

\stoptext

Wolfgang



More information about the ntg-context mailing list