![](https://secure.gravatar.com/avatar/7885cf9b6111344a62a77b00b1561364.jpg?s=120&d=mm&r=g)
Hi, Is it possible to put a table in another table? Example: this code gives me an error: ! Argument of \parseTD has an extra }. <inserted text> \par <to be read again> } \handleTBLcell ...\bTBLCELL \TBLcharalign {#2}{#4} \eTBLCELL \inTBLcell {#1}{... <inserted text> ...bl \begintblrow \makeTBL {1}{1} \nexttblcol \endtblrow \be... \endTBL ...x {\trialtypesettingtrue \the \tbltoks }\settbldis \maximumcol {\... \eTABLE ...}}\eTBL }\removeunwantedspaces \endTBL \stopTBLprocessing \fi \eg... l.172 \eTABLE ? x \placefigure [here,none] [fig:puntuacio-figures] {Puntuació de cada figura} {\bTABLE[frame=on,align={middle,lohi}] \bTR \bTD \bTABLE[frame=on,align={middle,lohi}] \bTR \bTD {\sc Cub} \eTD \eTR \bTR \bTD \externalfigure[figs/p-cube.jpg][scale=400] \eTD \eTR \bTR \bTD 2 punts \eTD \eTR \bTR \bTD Número de cares: 6 Forma de les cares: quadrat \eTD \eTR \eTABLE \eTD \eTR \bTR \bTD h \eTD \eTR \eTABLE} Thanks a lot, Xan.
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Sun, May 09 2010, Xan wrote:
Is it possible to put a table in another table?
Yes: \starttext \bTABLE \bTR \bTD {\bTABLE \bTR \bTD bla \eTD \eTR \eTABLE} \eTD \eTR \eTABLE \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
![](https://secure.gravatar.com/avatar/7885cf9b6111344a62a77b00b1561364.jpg?s=120&d=mm&r=g)
Thanks all of you. In other kind of ideas: is it a bug? Why we need {} for embed tables and not for embed itemizes in itemizes for example? Please CCme Xan.
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 09.05.10 14:37, schrieb Xan:
Thanks all of you. In other kind of ideas: is it a bug? Why we need {} for embed tables and not for embed itemizes in itemizes for example?
It has to do with the way how TABLE is implemented, each cell is defined as \def\bTD#1\eTD{...} this means when TeX sees a \bTD in the input it grabs everything till the \eTD, let's take a loo at this example \bTABLE \bTR \bTD \bTABLE \bTR \bTD text \eTD \eTR \eTABLE \eTD \eTR \eTABLE The \bTD from the outer table reads everything till the \eTD from the inner table and what ends up as real content for the table cell where you wanted another table is \bTABLE \bTR \bTD text As you can see the \bTD as delimiting \eTD to end the cell and this is what cause the error message you get. The braces ({...}) as suggested from the others help in this case because the hide the \eTD from the outer table and buffers as suggested from Taco are another way to get around this. Wolfgang
![](https://secure.gravatar.com/avatar/7885cf9b6111344a62a77b00b1561364.jpg?s=120&d=mm&r=g)
Thanks for the technical and simple explanation Xan. En/na Wolfgang Schuster ha escrit:
Am 09.05.10 14:37, schrieb Xan:
Thanks all of you. In other kind of ideas: is it a bug? Why we need {} for embed tables and not for embed itemizes in itemizes for example?
It has to do with the way how TABLE is implemented, each cell is defined as
\def\bTD#1\eTD{...}
this means when TeX sees a \bTD in the input it grabs everything till the \eTD, let's take a loo at this example
\bTABLE \bTR \bTD \bTABLE \bTR \bTD text \eTD \eTR \eTABLE \eTD \eTR \eTABLE
The \bTD from the outer table reads everything till the \eTD from the inner table and what ends up as real content for the table cell where you wanted another table is
\bTABLE \bTR \bTD text
As you can see the \bTD as delimiting \eTD to end the cell and this is what cause the error message you get. The braces ({...}) as suggested from the others help in this case because the hide the \eTD from the outer table and buffers as suggested from Taco are another way to get around this.
Wolfgang
participants (4)
-
Peter Münster
-
Taco Hoekwater
-
Wolfgang Schuster
-
Xan