[NTG-context] How to center a table horizontally ?

2010-11-17 Thread Lukas Prochazka
Hello all,

this must be a really basic question, but I cannot find out the answer.

I'm creating a table, but I cannot center it horizontally:

---
\starttext
  \startalignment[center]
\dontleavehmode

\starttable[|c|]
  \NC CCC \NC\NR
\stoptable
  \stopalignment
\stoptext
---

The code I used above works e.g. with pictures, so even if I'm using the 
\dontleavehmode trick, the table is still flushed left (see the attachments).

So is there a way how to center tables created by \starttable and 
\starttabulate horizontally?

Thank you in advance.

Best regards,

Lukas

t-CenTab.mkiv
Description: Binary data


t-CenTab.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to center a table horizontally?

2010-11-17 Thread Peter Münster
On Wed, Nov 17 2010, Lukas Prochazka wrote:

 I'm creating a table, but I cannot center it horizontally:
 
 ---
 \starttext
   \startalignment[center]
 \dontleavehmode
 
 \starttable[|c|]
   \NC CCC \NC\NR
 \stoptable
   \stopalignment
 \stoptext
 ---

I can't explain, what happens, but a \vbox helps:

\starttext
  \startalignment[middle]
\dontleavehmode
\vbox{%
  \starttable[|c|]
\NC CCC \NC\NR
  \stoptable
}
  \stopalignment
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___