From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49025 Path: news.gmane.org!not-for-mail From: Alan Stone Newsgroups: gmane.comp.tex.context Subject: Re: \doifmodeselse? Date: Thu, 2 Apr 2009 18:42:48 +0200 Message-ID: <326847810904020942x3f8a827bpb571f34eb3361cf6@mail.gmail.com> References: <342291F7-F682-41DA-81B3-B219E8F39381@rna.nl> <326847810904020928l800d273r10202753cca0ce8c@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1763333652==" X-Trace: ger.gmane.org 1238690648 954 80.91.229.12 (2 Apr 2009 16:44:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Apr 2009 16:44:08 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 02 18:45:26 2009 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 1LpQ2T-0006On-SK for gctc-ntg-context-518@m.gmane.org; Thu, 02 Apr 2009 18:45:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1F0291FB57; Thu, 2 Apr 2009 18:43:47 +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 23179-02-3; Thu, 2 Apr 2009 18:43:15 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B7F1A1FADB; Thu, 2 Apr 2009 18:43:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 321E11FADB for ; Thu, 2 Apr 2009 18:43:02 +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 23179-02-2 for ; Thu, 2 Apr 2009 18:42:51 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by ronja.ntg.nl (Postfix) with ESMTP id AC2B91FA4C for ; Thu, 2 Apr 2009 18:42:51 +0200 (CEST) Original-Received: from mail-ew0-f173.google.com (mail-ew0-f173.google.com [209.85.219.173]) by filter4-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n32Ggmkw009481 for ; Thu, 2 Apr 2009 18:42:51 +0200 Original-Received: by ewy21 with SMTP id 21so641960ewy.2 for ; Thu, 02 Apr 2009 09:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=r9ryZ4cgNQIJkemXdrk4CpkpACstaS1EcrB2NwRdlnI=; b=EFblqF/7GWXNBX+otOPaEE/Ebns4K5clqJfCKsP3NJdDm0XvwgHdtxBZh6gcAkPW4a WCdPxxcTLgLRN5919+3oNIrJ9jrdkt7uEsxyzu/f/2W8ku28iSJsTtP8qUKv9pCD0VqH 1UH/pUoGoeFsSiSivJDR7I4Ji9jSC7k1//lss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=KXw6hjgCRJQ6TzlO0PeoBb6w3r9u2+DjNW9q5YfBA+xiA/GMeva2O6q2QEynHIKLoK DxSQfW8pxDvSFNJz98ok5p6QZsznWc2lmzp99fb1n97JHd33SvTVBZ7lUo/vLS+an2pN k6REH5ql3sDBhlv1g9W5Jb/mGDteMJPBLXUWQ= Original-Received: by 10.216.49.194 with SMTP id x44mr105200web.130.1238690568819; Thu, 02 Apr 2009 09:42:48 -0700 (PDT) In-Reply-To: <326847810904020928l800d273r10202753cca0ce8c@mail.gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.219.173; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 203118834 - b50c756c73cb - 20090402 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:49025 Archived-At: --===============1763333652== Content-Type: multipart/alternative; boundary=0016367f9b145755d50466951f9a --0016367f9b145755d50466951f9a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit For your information... http://www.pragma-ade.com/general/manuals/mmodes.pdf Alan On Thu, Apr 2, 2009 at 6:28 PM, Alan Stone wrote: > On Thu, Apr 2, 2009 at 6:01 PM, Gerben Wierda wrote: > >> Using --mode or --modes with texexec sets up modes which can be used in >> the files to parse different parts. >> >> For that I use \doifmodeelse{}{}{} >> >> But combining various modes in one \doiffmodeelse would be handy. >> >> e.g. (pseudocode) >> >> if mode is workinprogress or test >> >> or the other way around >> >> if mode is all or editor >> >> So I would like something like >> >> \doifmodeselse{all,editor) > > > Do you mean something like this ? > > \starttext > \doifmodeelse{a,b} > {\doifmode{a}{a} > \doifmode{b}{b}} > {c} > \stoptext > > context.cmd --modes=a modes > context.cmd --modes=a,b modes > context.cmd --modes=c modes > > Alan > > >> >> >> or even better booleans >> >> \doiffmodeselse{not test or editor} >> >> so I do not need to build a large setup of nested \ifmodeelse >> >> This is not in ConTeXt currently. Would it be easy to program such a >> multiple modes selector? >> >> G >> > --0016367f9b145755d50466951f9a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
For your information...
=A0
=A0
Alan

On Thu, Apr 2, 2009 at 6:28 PM, Alan Stone <software.= list.1es9s@gmail.com> wrote:
On Thu, Apr 2, 2009 at 6:01 PM, Gerben Wierda <Gerb= en.Wierda@rna.nl> wrote:
Using --mode or --modes with tex= exec sets up modes which can be used in the files to parse different parts.=

For that I use \doifmodeelse{}{}{}

But combining various modes i= n one \doiffmodeelse would be handy.

e.g. (pseudocode)

=A0if = mode is workinprogress or test

or the other way around

=A0if = mode is all or editor

So I would like something like

\doifmodeselse{all,editor)
=A0
Do you mean something like this ?
=A0
\starttext
\doifmodeelse{a,b}
=A0{\doifmode{a}{a}
=A0=A0\doifmode{b}{b}}=A0{c}
\stoptext
=A0
context.cmd --modes=3Da modes
context.cmd --modes=3Da,b modes
context.cmd --modes=3Dc modes
=A0
Alan
=A0


or even bet= ter booleans

\doiffmodeselse{not test or editor}

so I do not = need to build a large setup of nested \ifmodeelse

This is not in ConTeXt currently. Would it be easy to program such a mu= ltiple modes selector?

G
--0016367f9b145755d50466951f9a-- --===============1763333652== 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 ___________________________________________________________________________________ --===============1763333652==--