ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* TABLE in TABLE
@ 2006-04-10 18:31 Peter Münster
  2006-04-10 20:31 ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Münster @ 2006-04-10 18:31 UTC (permalink / raw)


Hello,
a little feature request: a TABLE in a TABLE
It would be nice, if something like the following could work:

\starttext
\bTABLE
\bTR\bTD bla\eTD \eTR
\bTR\bTD
  \bTABLE
  \bTR\bTD 1\eTD \eTR
  \bTR\bTD 2\eTD \eTR
  \eTABLE
\eTD \eTR
\eTABLE
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2006-04-10 18:31 TABLE in TABLE Peter Münster
@ 2006-04-10 20:31 ` Hans Hagen
  2006-04-10 20:48   ` Peter Münster
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2006-04-10 20:31 UTC (permalink / raw)


� wrote:
> Hello,
> a little feature request: a TABLE in a TABLE
> It would be nice, if something like the following could work:
>
> \starttext
> \bTABLE
> \bTR\bTD bla\eTD \eTR
> \bTR\bTD
>   
{
>   \bTABLE
>   \bTR\bTD 1\eTD \eTR
>   \bTR\bTD 2\eTD \eTR
>   \eTABLE
>   
}
> \eTD \eTR
> \eTABLE
> \stoptext
>
> Cheers, Peter
>
>   


-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2006-04-10 20:31 ` Hans Hagen
@ 2006-04-10 20:48   ` Peter Münster
  2006-04-10 20:54     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Münster @ 2006-04-10 20:48 UTC (permalink / raw)


On Mon, 10 Apr 2006, Hans Hagen wrote:

> > \bTR\bTD
> >   
> {
> >   \bTABLE
> >   \bTR\bTD 1\eTD \eTR
> >   \bTR\bTD 2\eTD \eTR
> >   \eTABLE
> >   
> }
> > \eTD \eTR

I had the same idea, but I used \bgroup and \egroup instead of {}, and that
does not work. Strange...
Thank you, Hans!
Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2006-04-10 20:48   ` Peter Münster
@ 2006-04-10 20:54     ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2006-04-10 20:54 UTC (permalink / raw)


� wrote:
> On Mon, 10 Apr 2006, Hans Hagen wrote:
>
>   
>>> \bTR\bTD
>>>   
>>>       
>> {
>>     
>>>   \bTABLE
>>>   \bTR\bTD 1\eTD \eTR
>>>   \bTR\bTD 2\eTD \eTR
>>>   \eTABLE
>>>   
>>>       
>> }
>>     
>>> \eTD \eTR
>>>       
>
> I had the same idea, but I used \bgroup and \egroup instead of {}, and that
> does not work. Strange...
>   
not if you imagine that we have

\def\bTABLE[#1==options]#2\eTABLE

and something #2 can handle {nested stuff} but in the case of a \bgroup 
it means that #2==\bgroup  etc etc

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2010-05-09 12:54   ` Wolfgang Schuster
@ 2010-05-09 13:01     ` Xan
  0 siblings, 0 replies; 10+ messages in thread
From: Xan @ 2010-05-09 13:01 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

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
>

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2010-05-09 12:37 ` Xan
@ 2010-05-09 12:54   ` Wolfgang Schuster
  2010-05-09 13:01     ` Xan
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2010-05-09 12:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Xan

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

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2010-05-09 11:42 Xan
  2010-05-09 12:01 ` Taco Hoekwater
  2010-05-09 12:03 ` Peter Münster
@ 2010-05-09 12:37 ` Xan
  2010-05-09 12:54   ` Wolfgang Schuster
  2 siblings, 1 reply; 10+ messages in thread
From: Xan @ 2010-05-09 12:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2010-05-09 11:42 Xan
  2010-05-09 12:01 ` Taco Hoekwater
@ 2010-05-09 12:03 ` Peter Münster
  2010-05-09 12:37 ` Xan
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Münster @ 2010-05-09 12:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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/


___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TABLE in TABLE
  2010-05-09 11:42 Xan
@ 2010-05-09 12:01 ` Taco Hoekwater
  2010-05-09 12:03 ` Peter Münster
  2010-05-09 12:37 ` Xan
  2 siblings, 0 replies; 10+ messages in thread
From: Taco Hoekwater @ 2010-05-09 12:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Xan wrote:
> Hi,
> 
> Is it possible to put a table in another table?

IIRC, putting the nested table in a buffer should work, but
maybe it is good enough to just add a brace group around it:
\bTD { \bTABLE ... \eTABLE } \eTD

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* TABLE in TABLE
@ 2010-05-09 11:42 Xan
  2010-05-09 12:01 ` Taco Hoekwater
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Xan @ 2010-05-09 11:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-05-09 13:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-10 18:31 TABLE in TABLE Peter Münster
2006-04-10 20:31 ` Hans Hagen
2006-04-10 20:48   ` Peter Münster
2006-04-10 20:54     ` Hans Hagen
2010-05-09 11:42 Xan
2010-05-09 12:01 ` Taco Hoekwater
2010-05-09 12:03 ` Peter Münster
2010-05-09 12:37 ` Xan
2010-05-09 12:54   ` Wolfgang Schuster
2010-05-09 13:01     ` Xan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).