From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Damien Thiriet via ntg-context <ntg-context@ntg.nl>
Cc: damien@thiriet.web4me.fr
Subject: [NTG-context] Re: troubles with xtable (might be because I nest the same xtables)
Date: Sun, 24 Nov 2024 14:44:53 +0100 [thread overview]
Message-ID: <bb460d8b-9089-0df1-6ad6-7731229750f0@gmail.com> (raw)
In-Reply-To: <ed9f2b4016b2467a9d515cabaa848b03@thiriet.web4me.fr>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-11-24 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 12:19 [NTG-context] " Damien Thiriet via ntg-context
2024-11-24 13:44 ` Wolfgang Schuster [this message]
2024-11-27 22:22 [NTG-context] " Damien Thiriet via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb460d8b-9089-0df1-6ad6-7731229750f0@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=damien@thiriet.web4me.fr \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).