![](https://secure.gravatar.com/avatar/31e6c631579c37a01952c3f4dc885d5f.jpg?s=120&d=mm&r=g)
Hello again, I would like to nest a table inside a table, something like this: \starttable[|c|c|] \NC {\bf ATout Choeur} \NC {\starttable[|c|] \NC Number 2008--1\FR \NC january 2008\LR \stoptable}\MR \NC {\tfa Something} \NC \LR \stoptable but 1/ I would like the top of the first cell of the first row to be aligned with the top of the second one (which contains the nested table); 2/ it seems that it does not work when the layout is set up with "grid=yes" If the answer to the second question is "Effectively, it can't work in such a layout", what could be a way of obtaining what I want? As always, any hint would be greatly appreciated Many thanks to all -- Yvon Henel
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Wed, 2 Jan 2008 16:22:26 +0100
Yvon Henel
Hello again,
I would like to nest a table inside a table, something like this:
\starttable[|c|c|] \NC {\bf ATout Choeur} \NC {\starttable[|c|] \NC Number 2008--1\FR \NC january 2008\LR \stoptable}\MR \NC {\tfa Something} \NC \LR \stoptable
but 1/ I would like the top of the first cell of the first row to be aligned with the top of the second one (which contains the nested table); 2/ it seems that it does not work when the layout is set up with "grid=yes"
If the answer to the second question is "Effectively, it can't work in such a layout", what could be a way of obtaining what I want?
As always, any hint would be greatly appreciated
Do you really need nested tables? Try one of the following solution. \starttext \starttable[|c|cp(3cm)|] \NC \bf ATout Choeur \NC Number 2008--1\crlf january 2008 \NC\AR \NC \tfa Something \NC \NC\AR \stoptable \starttabulate[|c|cp(3cm)|] \NC \bf ATout Choeur \NC Number 2008--1\crlf january 2008 \NC\NR \NC \tfa Something \NC \NC\NR \stoptabulate \setupTABLE[column][align=middle,frame=off] \setupTABLE[column][first][style=bold] \bTABLE \bTR \bTD ATout Choeur \eTD \bTD Number 2008--1\crlf january 2008 \eTD \eTR \bTR \bTD Something \eTD \bTD \eTD \eTR \eTABLE \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Wed, 2 Jan 2008, Yvon Henel wrote:
Hello again,
I would like to nest a table inside a table, something like this:
\starttable[|c|c|] \NC {\bf ATout Choeur} \NC {\starttable[|c|] \NC Number 2008--1\FR \NC january 2008\LR \stoptable}\MR \NC {\tfa Something} \NC \LR \stoptable
but 1/ I would like the top of the first cell of the first row to be aligned with the top of the second one (which contains the nested table); 2/ it seems that it does not work when the layout is set up with "grid=yes"
If the answer to the second question is "Effectively, it can't work in such a layout", what could be a way of obtaining what I want?
tables (starttables...stoptables) cannot be nested. Table does some automatic checking of number of columns, and that counting is global. So, nested tables messes the count. Here is an example: \starttext \starttable[|c|c|] \NC \the\currentTABLEcolumn/ \the\maxTABLEcolumn\NC {\starttable[|c|] \NC \the\currentTABLEcolumn/ \the\maxTABLEcolumn\NC \AR \NC test \NC \AR \stoptable} \NC \AR \NC \the\currentTABLEcolumn/ \the\maxTABLEcolumn\NC \NC \AR \stoptable \stoptext
As always, any hint would be greatly appreciated
You can always use multicolumns, and give the impression that you are using multiple tables. For example \starttable[|c|c|c|] \NC col 1 \NC nested 1 \NC nested 2 \NC \AR \NC \NC nested 1 \NC nested 2 \NC \AR \NC col 1 \NC \TWO{ col 2 } \NC \AR \stoptable This, of course, will not work if you want nested tables with different number of columns in different rows. In that case, TABLE macros (bTABLE .. eTABLE) would be the way to go. Aditya
![](https://secure.gravatar.com/avatar/31e6c631579c37a01952c3f4dc885d5f.jpg?s=120&d=mm&r=g)
Le mercredi 2 janvier 2008, vous avez écrit :
tables (starttables...stoptables) cannot be nested. Table does some automatic checking of number of columns, and that counting is global. So, nested tables messes the count. Here is an example: [cut]
This, of course, will not work if you want nested tables with different number of columns in different rows. In that case, TABLE macros (bTABLE .. eTABLE) would be the way to go.
Thank you for this piece of advice. I've found some documents about TABLE on the net. I will study them real soon and hope to be able to obtain what I want. -- Yvon Henel
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
On Thu, 3 Jan 2008 15:45:03 +0100
Yvon Henel
Le mercredi 2 janvier 2008, vous avez écrit :
tables (starttables...stoptables) cannot be nested. Table does some automatic checking of number of columns, and that counting is global. So, nested tables messes the count. Here is an example: [cut]
This, of course, will not work if you want nested tables with different number of columns in different rows. In that case, TABLE macros (bTABLE .. eTABLE) would be the way to go.
Thank you for this piece of advice. I've found some documents about TABLE on the net. I will study them real soon and hope to be able to obtain what I want.
\starttext \bTABLE[frame=off,align=middle] \bTR \bTD \bf ATout Choeur \eTD \bTD {\bTABLE[frame=off,align=middle] \bTR\bTD Number 2008--1 \eTD\eTR \bTR\bTD january 2008 \eTD\eTR \eTABLE} \eTD \eTR \bTR \bTD \tfa Something \eTD \bTD \eTD \eTR \eTABLE \stoptext Wolfgang
participants (3)
-
Aditya Mahajan
-
Wolfgang Schuster
-
Yvon Henel