Fabrice Couvreur schrieb am 10.10.18 um 20:09:
Hi Pablo,
Thank you, I thought that indicating width = 1.7cm, the size of the cells would have been 1.7cm.

You’re correct and what Pablo meant is the textwidth option for natural tables where you can set a width for the whole table.


The big space below the table in your example is a wrong calculation of the cell height for the merged cells. The height is probably wrong because ConTeXt uses the width of the first column (and not of all merged cells) to determine the height.

\starttext

\startxtable[width=2cm]
    \startxrow
        \startxcell
            Column 1
        \stopxcell
        \startxcell
            Column 2
        \stopxcell
    \stopxrow
    \startxrow
        \startxcell[nx=2]
            Merged column
        \stopxcell
    \stopxrow
\stopxtable

\stoptext


When your goal of the merged cells is to create a caption for the table you can use the “nonumber” keyword for placetable to get rid of the label and counter of the float.

\starttext

\startplacetable[location={nonumber,right},title={A long title for this short table}]
    \startxtable[width=2cm]
        \startxrow
            \startxcell
                Column 1
            \stopxcell
            \startxcell
                Column 2
            \stopxcell
        \stopxrow
    \stopxtable
\stopplacetable
\input knuth

\stoptext

Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to