ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with comma lists and tabulate
@ 2002-06-10 14:23 Simon Pepping
  2002-06-11 15:17 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Pepping @ 2002-06-10 14:23 UTC (permalink / raw)


Hi,

This file causes an error which I think should not occur. The error
does not occur when I remove \NC from \XMLDBshowElementTH. It seems to
me that either \csname next1\endcsname or \p!doprocessaction has the
wrong value.

\tracingmacros=2\tracingcommands=2

\def\XMLDBshowElementTH#1{\NC\csname XMLDB#1\endcsname}

\starttext
\def\XMLDBElementList{revnumber,date,authorinitials,revremark,revdescription}
\starttabulate[|l|l|l|l|l|]
    \processcommacommand[\XMLDBElementList]\XMLDBshowElementTH \NC\NR\ML
\stoptabulate

\stoptext

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl


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

* Re: Problem with comma lists and tabulate
  2002-06-10 14:23 Problem with comma lists and tabulate Simon Pepping
@ 2002-06-11 15:17 ` Hans Hagen
  2002-06-13 13:26   ` Simon Pepping
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2002-06-11 15:17 UTC (permalink / raw)
  Cc: ntg-context

At 04:23 PM 6/10/2002 +0200, Simon Pepping wrote:
>Hi,
>
>This file causes an error which I think should not occur. The error
>does not occur when I remove \NC from \XMLDBshowElementTH. It seems to
>me that either \csname next1\endcsname or \p!doprocessaction has the
>wrong value.
>
>\tracingmacros=2\tracingcommands=2
>
>\def\XMLDBshowElementTH#1{\NC\csname XMLDB#1\endcsname}
>
>\starttext
>\def\XMLDBElementList{revnumber,date,authorinitials,revremark,revdescription}
>\starttabulate[|l|l|l|l|l|]
>     \processcommacommand[\XMLDBElementList]\XMLDBshowElementTH \NC\NR\ML
>\stoptabulate
>
>\stoptext

Ah, you mean the \par message? This is related to the non existing i.e. 
only living inside tex \endtemplate primitive and the message is one of 
those originating deep inside tex when tex is not really able to determine 
the problem (similar things happen with missing { or } messages when 
v/halignments are used in the wrong v/h mode).

The problem is that commalist processing can be nested and has no grouping, 
which means that the internal counters get confused when used inside 
implicitly grouped situations like alignment cells. So, one way out is a 
rather dirty trick:

\expanded{\globalprocesscommalist[\XMLDBElementList]}

i.e. use a special version of comma list processing

[BTW, i now have a version of bTABLE cum suis running which breaks across 
pages and has auto-repeated headers, handy for xml too]

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


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

* Re: Problem with comma lists and tabulate
  2002-06-11 15:17 ` Hans Hagen
@ 2002-06-13 13:26   ` Simon Pepping
  2002-06-14 11:12     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Pepping @ 2002-06-13 13:26 UTC (permalink / raw)
  Cc: ntg-context

On Tue, Jun 11, 2002 at 05:17:46PM +0200, Hans Hagen wrote:
> At 04:23 PM 6/10/2002 +0200, Simon Pepping wrote:
> >Hi,
> >
> >This file causes an error which I think should not occur. The error
> >does not occur when I remove \NC from \XMLDBshowElementTH. It seems to
> >me that either \csname next1\endcsname or \p!doprocessaction has the
> >wrong value.
> >
> >\tracingmacros=2\tracingcommands=2
> >
> >\def\XMLDBshowElementTH#1{\NC\csname XMLDB#1\endcsname}
> >
> >\starttext
> >\def\XMLDBElementList{revnumber,date,authorinitials,revremark,revdescription}
> >\starttabulate[|l|l|l|l|l|]
> >     \processcommacommand[\XMLDBElementList]\XMLDBshowElementTH \NC\NR\ML
> >\stoptabulate
> >
> >\stoptext
> 
> 
> Ah, you mean the \par message? This is related to the non existing i.e. 
> only living inside tex \endtemplate primitive and the message is one of 
> those originating deep inside tex when tex is not really able to determine 
> the problem (similar things happen with missing { or } messages when 
> v/halignments are used in the wrong v/h mode).
> 
> The problem is that commalist processing can be nested and has no grouping, 
> which means that the internal counters get confused when used inside 
> implicitly grouped situations like alignment cells. So, one way out is a 
> rather dirty trick:
> 
> \expanded{\globalprocesscommalist[\XMLDBElementList]}
> 
> i.e. use a special version of comma list processing

Well, I get a different error message, but this does solve the problem.

> [BTW, i now have a version of bTABLE cum suis running which breaks across 
> pages and has auto-repeated headers, handy for xml too]

Good. I encountered the above problem in an effort to map to a
tabulate. I have now worked out a version using bTABLE, which seems
easier to automate.

Regards, Simon

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl


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

* Re: Problem with comma lists and tabulate
  2002-06-13 13:26   ` Simon Pepping
@ 2002-06-14 11:12     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2002-06-14 11:12 UTC (permalink / raw)
  Cc: ntg-context

At 03:26 PM 6/13/2002 +0200, Simon Pepping wrote:

>Good. I encountered the above problem in an effort to map to a
>tabulate. I have now worked out a version using bTABLE, which seems
>easier to automate.

indeed, and the latest version also supports breaking across pages and 
auto-head repetition (still beta)

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


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

end of thread, other threads:[~2002-06-14 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-10 14:23 Problem with comma lists and tabulate Simon Pepping
2002-06-11 15:17 ` Hans Hagen
2002-06-13 13:26   ` Simon Pepping
2002-06-14 11:12     ` Hans Hagen

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