ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Expansion and database module
@ 2010-07-30  8:29 Jaroslav Hajtmar
  2010-07-30  8:34 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Hajtmar @ 2010-07-30  8:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello all,

My big weakness in TeX practice is working with the expansion. Perhaps 
because he speaks so Lua.
I would like to ask whether there is any possibility of printing table 
columns (throw Mojca database module) when the column data are contained 
in a separate macro.


Example:

\usemodule[database]

\defineseparatedlist
[NaturalTable]
[separator=comma,
before=\bTABLE,after=\eTABLE,
first=\bTR,last=\eTR,
left=\bTD,right=\eTD]

\def\tabrow{A, B, C}


\starttext

\startseparatedlist[NaturalTable]
a,b,c
A,B,C
\stopseparatedlist

\blank[big]

\startseparatedlist[NaturalTable]
\tabrow
\stopseparatedlist


%But I would like get table with three separate columns

\stoptext


While I can parsing column data contained in macro \tabrow, anyway I 
cant transmit column data to \startseparatedlist[NaturalTable] .. 
\stopseparatedlist environment to make it work.

Thanx Jaroslav


___________________________________________________________________________________
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] 5+ messages in thread

* Re: Expansion and database module
  2010-07-30  8:29 Expansion and database module Jaroslav Hajtmar
@ 2010-07-30  8:34 ` Hans Hagen
  2010-07-30  8:50   ` Jaroslav Hajtmar
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2010-07-30  8:34 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users

On 30-7-2010 10:29, Jaroslav Hajtmar wrote:
> Hello all,
>
> My big weakness in TeX practice is working with the expansion. Perhaps
> because he speaks so Lua.
> I would like to ask whether there is any possibility of printing table
> columns (throw Mojca database module) when the column data are contained
> in a separate macro.
>
>
> Example:
>
> \usemodule[database]
>
> \defineseparatedlist
> [NaturalTable]
> [separator=comma,
> before=\bTABLE,after=\eTABLE,
> first=\bTR,last=\eTR,
> left=\bTD,right=\eTD]
>
> \def\tabrow{A, B, C}
>
>
> \starttext
>
> \startseparatedlist[NaturalTable]
> a,b,c
> A,B,C
> \stopseparatedlist
>
> \blank[big]
>
> \startseparatedlist[NaturalTable]
> \tabrow
> \stopseparatedlist

\expanded{\startseparatedlist[NaturalTable]
\tabrow}
\stopseparatedlist

might work


>
> %But I would like get table with three separate columns
>
> \stoptext
>
>
> While I can parsing column data contained in macro \tabrow, anyway I
> cant transmit column data to \startseparatedlist[NaturalTable] ..
> \stopseparatedlist environment to make it work.
>
> Thanx Jaroslav
>
>
> ___________________________________________________________________________________
>
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Expansion and database module
  2010-07-30  8:34 ` Hans Hagen
@ 2010-07-30  8:50   ` Jaroslav Hajtmar
  2010-07-30  8:53     ` Jaroslav Hajtmar
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Hajtmar @ 2010-07-30  8:50 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Thanx Hans, but your example do not print anything.
I dont know why, but output is empty...

Jaroslav


Dne 30.7.2010 10:34, Hans Hagen napsal(a):
> On 30-7-2010 10:29, Jaroslav Hajtmar wrote:
>> Hello all,
>>
>> My big weakness in TeX practice is working with the expansion. Perhaps
>> because he speaks so Lua.
>> I would like to ask whether there is any possibility of printing table
>> columns (throw Mojca database module) when the column data are contained
>> in a separate macro.
>>
>>
>> Example:
>>
>> \usemodule[database]
>>
>> \defineseparatedlist
>> [NaturalTable]
>> [separator=comma,
>> before=\bTABLE,after=\eTABLE,
>> first=\bTR,last=\eTR,
>> left=\bTD,right=\eTD]
>>
>> \def\tabrow{A, B, C}
>>
>>
>> \starttext
>>
>> \startseparatedlist[NaturalTable]
>> a,b,c
>> A,B,C
>> \stopseparatedlist
>>
>> \blank[big]
>>
>> \startseparatedlist[NaturalTable]
>> \tabrow
>> \stopseparatedlist
>
> \expanded{\startseparatedlist[NaturalTable]
> \tabrow}
> \stopseparatedlist
>
> might work
>
>
>>
>> %But I would like get table with three separate columns
>>
>> \stoptext
>>
>>
>> While I can parsing column data contained in macro \tabrow, anyway I
>> cant transmit column data to \startseparatedlist[NaturalTable] ..
>> \stopseparatedlist environment to make it work.
>>
>> Thanx Jaroslav
>>
>>
>> ___________________________________________________________________________________ 
>>
>>
>> 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
>> ___________________________________________________________________________________ 
>>
>>
>
>

___________________________________________________________________________________
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] 5+ messages in thread

* Re: Expansion and database module
  2010-07-30  8:50   ` Jaroslav Hajtmar
@ 2010-07-30  8:53     ` Jaroslav Hajtmar
  2010-07-30  9:30       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Hajtmar @ 2010-07-30  8:53 UTC (permalink / raw)
  To: ntg-context

appendix:
Is it possible that the error is in the Mojca database module??

Jaroslav


Dne 30.7.2010 10:50, Jaroslav Hajtmar napsal(a):
> Thanx Hans, but your example do not print anything.
> I dont know why, but output is empty...
>
> Jaroslav
>
>
> Dne 30.7.2010 10:34, Hans Hagen napsal(a):
>> On 30-7-2010 10:29, Jaroslav Hajtmar wrote:
>>> Hello all,
>>>
>>> My big weakness in TeX practice is working with the expansion. Perhaps
>>> because he speaks so Lua.
>>> I would like to ask whether there is any possibility of printing table
>>> columns (throw Mojca database module) when the column data are 
>>> contained
>>> in a separate macro.
>>>
>>>
>>> Example:
>>>
>>> \usemodule[database]
>>>
>>> \defineseparatedlist
>>> [NaturalTable]
>>> [separator=comma,
>>> before=\bTABLE,after=\eTABLE,
>>> first=\bTR,last=\eTR,
>>> left=\bTD,right=\eTD]
>>>
>>> \def\tabrow{A, B, C}
>>>
>>>
>>> \starttext
>>>
>>> \startseparatedlist[NaturalTable]
>>> a,b,c
>>> A,B,C
>>> \stopseparatedlist
>>>
>>> \blank[big]
>>>
>>> \startseparatedlist[NaturalTable]
>>> \tabrow
>>> \stopseparatedlist
>>
>> \expanded{\startseparatedlist[NaturalTable]
>> \tabrow}
>> \stopseparatedlist
>>
>> might work
>>
>>
>>>
>>> %But I would like get table with three separate columns
>>>
>>> \stoptext
>>>
>>>
>>> While I can parsing column data contained in macro \tabrow, anyway I
>>> cant transmit column data to \startseparatedlist[NaturalTable] ..
>>> \stopseparatedlist environment to make it work.
>>>
>>> Thanx Jaroslav
>>>
>>>
>>> ___________________________________________________________________________________ 
>>>
>>>
>>> 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
>>> ___________________________________________________________________________________ 
>>>
>>>
>>
>>
>
> ___________________________________________________________________________________ 
>
> 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
> ___________________________________________________________________________________ 
>
>

___________________________________________________________________________________
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] 5+ messages in thread

* Re: Expansion and database module
  2010-07-30  8:53     ` Jaroslav Hajtmar
@ 2010-07-30  9:30       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2010-07-30  9:30 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users

On 30-7-2010 10:53, Jaroslav Hajtmar wrote:
> appendix:
> Is it possible that the error is in the Mojca database module??

no, it's related to the nature of the module ... it operates on raw data 
and avoids expansion as well as uses line endings with a different 
catcode ... there is no way around it and as the module is already 
somewhat complex it will not be touched

it might be easier to manage your data in lua tables and then write out 
context commands

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2010-07-30  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30  8:29 Expansion and database module Jaroslav Hajtmar
2010-07-30  8:34 ` Hans Hagen
2010-07-30  8:50   ` Jaroslav Hajtmar
2010-07-30  8:53     ` Jaroslav Hajtmar
2010-07-30  9:30       ` 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).