* xtable in def or setups
@ 2021-05-18 17:37 Werner Hennrich
2021-05-18 18:17 ` Adam Reviczky
0 siblings, 1 reply; 3+ messages in thread
From: Werner Hennrich @ 2021-05-18 17:37 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 789 bytes --]
Hello everyone,
I'm trying to create an xtable from within a \def (or within a \setups)
but always run into "runaway error: end of file encountered"
whenever the xtable-commands are in there.
\definextable[icbtable]
\setupxtable[icbtable]
[frame=off,
top=\vskip7mm]
\long\def\iconblock[#1]#2{%
\ignorespaces
\startxtable[icbtable]
\startxrow
\startxcell[width=17mm]
\externalfigure[img/#1.svg][height=15mm,width=15mm]
\stopxcell
\startxcell #2 \stopxcell
\stopxrow
\stopxtable
\removeunwantedspaces
}
Is this simply not possible or am I doing something wrong there?
system > ConTeXt ver: 2021.05.15 22:45 LMTX fmt: 2021.5.18
int: english/english
Thank you,
Werner
[-- Attachment #1.2: Type: text/html, Size: 2035 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: xtable in def or setups
2021-05-18 17:37 xtable in def or setups Werner Hennrich
@ 2021-05-18 18:17 ` Adam Reviczky
2021-05-18 18:58 ` Werner Hennrich
0 siblings, 1 reply; 3+ messages in thread
From: Adam Reviczky @ 2021-05-18 18:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1469 bytes --]
Hi Werner,
Did you try startembeddedxtable ?
See Section 5 in the manual (
https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf).
Adam
On Tue, May 18, 2021 at 6:38 PM Werner Hennrich <wehe@gmx.at> wrote:
> Hello everyone,
>
> I'm trying to create an xtable from within a \def (or within a \setups)
> but always run into "runaway error: end of file encountered"
> whenever the xtable-commands are in there.
>
> \definextable[icbtable]
> \setupxtable[icbtable]
> [frame=off,
> top=\vskip7mm]
> \long\def\iconblock[#1]#2{%
> \ignorespaces
> \startxtable[icbtable]
> \startxrow
> \startxcell[width=17mm]
> \externalfigure[img/#1.svg][height=15mm,width=15mm]
> \stopxcell
> \startxcell #2 \stopxcell
> \stopxrow
> \stopxtable
> \removeunwantedspaces
> }
>
> Is this simply not possible or am I doing something wrong there?
>
> system > ConTeXt ver: 2021.05.15 22:45 LMTX fmt: 2021.5.18
> int: english/english
>
> Thank you,
> Werner
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 3655 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: xtable in def or setups
2021-05-18 18:17 ` Adam Reviczky
@ 2021-05-18 18:58 ` Werner Hennrich
0 siblings, 0 replies; 3+ messages in thread
From: Werner Hennrich @ 2021-05-18 18:58 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1848 bytes --]
Hi Adam,
no, I hadn't tried that -
even tough I had skimmed over that part way back, it now escaped me.
\long\def\iconblock[#1]#2{%
\ignorespaces
*\startembeddedxtable[icbtable]*
\startxrow
\startxcell[width=17mm]
\externalfigure[img/#1.svg][height=15mm,width=15mm]
\stopxcell
\startxcell #2 \stopxcell
\stopxrow
*\stopembeddedxtable*
\removeunwantedspaces
}
that did the job.
Thanks a lot Adam!
Cheers, W
Am 18.05.21 um 20:17 schrieb Adam Reviczky:
> Hi Werner,
>
> Did you try startembeddedxtable ?
>
> See Section 5 in the manual
> (https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf
> <https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf>).
>
> Adam
>
> On Tue, May 18, 2021 at 6:38 PM Werner Hennrich <wehe@gmx.at
> <mailto:wehe@gmx.at>> wrote:
>
> Hello everyone,
>
> I'm trying to create an xtable from within a \def (or within a
> \setups)
> but always run into "runaway error: end of file encountered"
> whenever the xtable-commands are in there.
>
> \definextable[icbtable]
> \setupxtable[icbtable]
> [frame=off,
> top=\vskip7mm]
> \long\def\iconblock[#1]#2{%
> \ignorespaces
> \startxtable[icbtable]
> \startxrow
> \startxcell[width=17mm]
> \externalfigure[img/#1.svg][height=15mm,width=15mm]
> \stopxcell
> \startxcell #2 \stopxcell
> \stopxrow
> \stopxtable
> \removeunwantedspaces
> }
>
> Is this simply not possible or am I doing something wrong there?
>
> system > ConTeXt ver: 2021.05.15 22:45 LMTX fmt:
> 2021.5.18 int: english/english
>
> Thank you,
> Werner
>
> __________________________
>
[-- Attachment #1.2: Type: text/html, Size: 5202 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-18 18:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 17:37 xtable in def or setups Werner Hennrich
2021-05-18 18:17 ` Adam Reviczky
2021-05-18 18:58 ` Werner Hennrich
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).