ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Re: troubles with xtable (might be because I nest the same xtables)
@ 2024-11-27 22:22 Damien Thiriet via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Thiriet via ntg-context @ 2024-11-27 22:22 UTC (permalink / raw)
  To: ntg-context; +Cc: damien

Hi Wolfgang,

> Your problem here is a circular reference where a parameter (e.g. 
> framecolor) tries to load the value of > its parent because it has no 
> value itself. Since you set the parent to itself it results in an 
> endless > > loop until it runs out of memory.

Thanks, everything is clear now.

Damien
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: troubles with xtable (might be because I nest the same xtables)
  2024-11-24 12:19 [NTG-context] " Damien Thiriet via ntg-context
@ 2024-11-24 13:44 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2024-11-24 13:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Damien Thiriet via ntg-context; +Cc: damien

Damien Thiriet via ntg-context schrieb am 24.11.2024 um 13:19:
> Hello,
> 
> I have troubles with \definextable, something I obviously didn't understand
> This MWE compiles well.
> 
> \definextable [Test]
> \setupxtable [Test]
>     [frame=off]
> \starttext
> \startxtable %[Test]
>     \startxrow
>        \startxcell [Test]
> bla
>        \stopxcell
>        \startxcell [Test]
> bli
>        \stopxcell
>     \stopxrow
> \stopxtable
> \stoptext
> 
> However, if I uncomment [Test] afetr \startxtable, I get this error:
> 
> [...]
> 
> Why can't I nest the same kind of xtable?

These are *not* nested xtables.

Your problem here is a circular reference where a parameter (e.g. 
framecolor) tries to load the value of its parent because it has no 
value itself. Since you set the parent to itself it results in an 
endless loop until it runs out of memory.

To avoid this problem uses different instance name for the table as a 
whole and the named parameters for a cell, row etc.

\definextable [Tableinstance] [framecolor=red]

\setupxtable [Parameters] [foregroundstyle=italic]

\starttext

\startxtable [Tableinstance]
   \startxrow
     \startxcell [Parameters]
       bla
     \stopxcell
   \stopxrow
\stopxtable

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-11-27 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-27 22:22 [NTG-context] Re: troubles with xtable (might be because I nest the same xtables) Damien Thiriet via ntg-context
  -- strict thread matches above, loose matches on Subject: below --
2024-11-24 12:19 [NTG-context] " Damien Thiriet via ntg-context
2024-11-24 13:44 ` [NTG-context] " Wolfgang Schuster

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