[NTG-context] Text around a table (xtables)

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Wed Oct 10 20:29:06 CEST 2018



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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181010/6cc5f3bf/attachment.html>


More information about the ntg-context mailing list