ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Database module and command key
@ 2013-06-04 16:07 Wolfgang Schuster
  2013-06-04 16:50 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Schuster @ 2013-06-04 16:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

why has the meaning of the command key changed in MkIV?


In MkII you can define a command which has as many argument as entries in the list.

% engine=pdftex

\usemodule[database]

\starttext

\define[3]\TestCommand{\ruledhbox{#1:#2:#3}}

\defineseparatedlist[test][command=\TestCommand]

\starttest
1,2,3
\stoptest

\stoptext


In MkIV the argument of the command key is applied to each entry in the list
and you can’t grab all entries with a single command.

\usemodule[database]

\starttext

\define[1]\TestCommand{\ruledhbox{#1}}

\defineseparatedlist[test][command=\TestCommand]

\starttest
1,2,3
4,5,6
\stoptest

\stoptext

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

* Re: Database module and command key
  2013-06-04 16:07 Database module and command key Wolfgang Schuster
@ 2013-06-04 16:50 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2013-06-04 16:50 UTC (permalink / raw)
  To: ntg-context

On 6/4/2013 6:07 PM, Wolfgang Schuster wrote:
> Hi Hans,
>
> why has the meaning of the command key changed in MkIV?

Probably because it went unnoticed (I'm not using it myself). You can 
patch this:

                             if j == 1 then
                                 context(command)
                             end



> In MkII you can define a command which has as many argument as entries in the list.
>
> % engine=pdftex
>
> \usemodule[database]
>
> \starttext
>
> \define[3]\TestCommand{\ruledhbox{#1:#2:#3}}
>
> \defineseparatedlist[test][command=\TestCommand]
>
> \starttest
> 1,2,3
> \stoptest
>
> \stoptext
>
>
> In MkIV the argument of the command key is applied to each entry in the list
> and you can’t grab all entries with a single command.
>
> \usemodule[database]
>
> \starttext
>
> \define[1]\TestCommand{\ruledhbox{#1}}
>
> \defineseparatedlist[test][command=\TestCommand]
>
> \starttest
> 1,2,3
> 4,5,6
> \stoptest
>
> \stoptext
>
> Wolfgang
> ___________________________________________________________________________________
> 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] 2+ messages in thread

end of thread, other threads:[~2013-06-04 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-04 16:07 Database module and command key Wolfgang Schuster
2013-06-04 16:50 ` 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).