From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/44161 Path: news.gmane.org!not-for-mail From: "Alan Stone" Newsgroups: gmane.comp.tex.context Subject: Re: modes questions Date: Sat, 20 Sep 2008 18:19:32 +0200 Message-ID: <326847810809200919l1cd27df2ofc0e246d908a973f@mail.gmail.com> References: <326847810809110247m2ae86edch725ae07e34e0a6e7@mail.gmail.com> <48C8F71E.50408@wxs.nl> <326847810809171211h7cd20ff3ua878510eb9083968@mail.gmail.com> <48D16FB0.2060009@wxs.nl> <326847810809200817g200e9002p3bf5a7918d6f6760@mail.gmail.com> <48D51FD6.30205@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1761614623==" X-Trace: ger.gmane.org 1221929276 32159 80.91.229.12 (20 Sep 2008 16:47:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2008 16:47:56 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 20 18:48:52 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Kh5dc-0003DS-7M for gctc-ntg-context-518@m.gmane.org; Sat, 20 Sep 2008 18:48:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 768311FF00; Sat, 20 Sep 2008 18:47:45 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21716-01-5; Sat, 20 Sep 2008 18:46:49 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 578DE1FEF1; Sat, 20 Sep 2008 18:46:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E0E1A1FEEA for ; Sat, 20 Sep 2008 18:46:39 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20651-01-7 for ; Sat, 20 Sep 2008 18:46:20 +0200 (CEST) Original-Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.182]) by ronja.ntg.nl (Postfix) with ESMTP id 3AAD91FF07 for ; Sat, 20 Sep 2008 18:19:33 +0200 (CEST) Original-Received: by ik-out-1112.google.com with SMTP id c21so586652ika.2 for ; Sat, 20 Sep 2008 09:19:32 -0700 (PDT) Original-Received: by 10.210.35.5 with SMTP id i5mr1991197ebi.79.1221927572733; Sat, 20 Sep 2008 09:19:32 -0700 (PDT) Original-Received: by 10.210.16.2 with HTTP; Sat, 20 Sep 2008 09:19:32 -0700 (PDT) In-Reply-To: <48D51FD6.30205@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:44161 Archived-At: --===============1761614623== Content-Type: multipart/alternative; boundary="----=_Part_54107_25791304.1221927572738" ------=_Part_54107_25791304.1221927572738 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, Sep 20, 2008 at 6:07 PM, Hans Hagen wrote: > Alan Stone wrote: > > Are such macros possible ? > > > > modes: ma, mb, ... mz > > values: va, vb, ... vz > > command: cmd > > parameter: p > > > > (1) instead of > > > > \doifmode{ma}{\cmd[name][va]} > > \doifmode{mb}{\cmd[name][vb]} > > .... > > \doifmode{mz}{\cmd[name][vz]} > > > > a macro which does: \doifmode{m*}{\cmd[name][v*]} > > > > (2) instead of > > > > \doifmode{ma}{\cmd[p=va]} > > \doifmode{mb}{\cmd[p=vb]} > > .... > > \doifmode{mz}{\cmd[p=vz]} > > > > a macro which does: \doifmode{m*}{\cmd[p=v*]} > > nl, because there is no knowledge of what modes are set (i could cook > something up for mkiv or course) > > Is there something like, or the equivalent of, one/two dimensional arrays in (Con)TeXt ? array1={ma, mb, ... mz} array2={va, vb, ... vz} or array{{ma,va}, {mb,vb} ... {mz,vz}} -- Best, Alan * texmfstart texexec --lua foo * ConTeXt ver: 2008.09.16 19:49 MKIV fmt: 2008.9.20 int: english/english * Windows XP Home SP3 ------=_Part_54107_25791304.1221927572738 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On Sat, Sep 20, 2008 at 6:07 PM, Hans Hagen <pragma@wxs.nl> wrote:
Alan Stone wrote:
> Are such macros possible ?
>
> modes: ma, mb, ... mz
> values: va, vb, ... vz
> command: cmd
> parameter: p
>
> (1) instead of
>
> \doifmode{ma}{\cmd[name][va]}
> \doifmode{mb}{\cmd[name][vb]}
> ....
> \doifmode{mz}{\cmd[name][vz]}
>
> a macro which does: \doifmode{m*}{\cmd[name][v*]}
>
> (2) instead of
>
> \doifmode{ma}{\cmd[p=va]}
> \doifmode{mb}{\cmd[p=vb]}
> ....
> \doifmode{mz}{\cmd[p=vz]}
>
> a macro which does: \doifmode{m*}{\cmd[p=v*]}

nl, because there is no knowledge of what modes are set (i could cook
something up for mkiv or course)

 
 
Is there something like, or the equivalent of, one/two dimensional arrays in (Con)TeXt ?
 
array1={ma, mb, ... mz}
array2={va, vb, ... vz}
 
or
 
array{{ma,va}, {mb,vb} ... {mz,vz}}
 
--
Best,
Alan

* texmfstart texexec --lua foo
* ConTeXt  ver: 2008.09.16 19:49 MKIV fmt: 2008.9.20  int: english/english
* Windows XP Home SP3
------=_Part_54107_25791304.1221927572738-- --===============1761614623== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1761614623==--