From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88526 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: [doifinset] how it works ? Date: Fri, 22 Aug 2014 06:47:57 +0200 Message-ID: <5B5BF772-2401-4CBB-A2B8-9D71E219D553@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1408682913 29779 80.91.229.3 (22 Aug 2014 04:48:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Aug 2014 04:48:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 22 06:48:25 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XKglt-0003YW-P8 for gctc-ntg-context-518@m.gmane.org; Fri, 22 Aug 2014 06:48:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 52BFA102AF for ; Fri, 22 Aug 2014 06:48:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OsGrhiq64TAP for ; Fri, 22 Aug 2014 06:48:17 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id AA55D1021F for ; Fri, 22 Aug 2014 06:48:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8E70E101E3 for ; Fri, 22 Aug 2014 06:48:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id J7jQ7vVDgh8w for ; Fri, 22 Aug 2014 06:48:02 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 761E5101E1 for ; Fri, 22 Aug 2014 06:48:02 +0200 (CEST) Original-Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s7M5EVE9022605 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 22 Aug 2014 07:14:31 +0200 Original-Received: by mail-wi0-f180.google.com with SMTP id n3so9369776wiv.7 for ; Thu, 21 Aug 2014 21:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=RYAgNQ+t6v5QwOmWHF9gOPi3ENX70nWEbC46l0DrMJc=; b=V0b452gJ0/ZBZ4HZe3IxSKkHmE6dcjsBp5AshYTlnd8tvlnvT8gwaGd+i2nEdhT9OG g+OR4Hlb9u1tO/i0NhoBWJ/+HN3c2pg0u5G2NI/zCyWyC3cqZ4r8IxsxMjclD8CpYPRt abbSdylsV6L+pgxxVIPfThAd+cL7KglNLiGck/mRysNFAFWj9WhjaWlWMRlHGqg9tl3s XBKZVGRXr07yVRY5zIu1eFSvpJnDcqKKMW4bKMdXhxagAvlZ+58NAr5aH0WxgmPgo2gE Sd3erG4GcESj0zW9fHU+foSKC4T7UvHY6HsP5JJ1Uik9FqHtCkFooY68PQHUOpV9tBMJ ybaA== X-Received: by 10.180.97.101 with SMTP id dz5mr26381504wib.52.1408682881224; Thu, 21 Aug 2014 21:48:01 -0700 (PDT) Original-Received: from keima.localdomain (x2f25f06.dyn.telefonica.de. [2.242.95.6]) by mx.google.com with ESMTPSA id mw4sm27046264wic.20.2014.08.21.21.47.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 21:48:00 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::234; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01MFFevOR - fef6544583b2 - 20140822 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88526 Archived-At: Am 21.08.2014 um 21:58 schrieb Pierre-Fran=E7ois Bonnefoi : > Hello, > = > I'm currently prepping my teaching material for my back-to-university. > = > I want to design some conditional slides based presentation where I can s= elect the slides that I want to show in my final presentation. > = > My current attempt is to use : > 1 - MKIV as I use currently only MKII; > 2 - a counter is defined, that it is incremented at each slide definition; > 3 - a commalist to indicate the slides that I want. The number affected t= o each slide is made according to its definition in the file and not the sl= ide number displayed; > 4 - a block is added to enclosed each slide in order to allow or not it t= o be shown in the final presentation. > = > \definenumber[slide][way=3Dbytext,prefix=3Dno] > % firstly I generate a full commalist = > \def\slidelist{} > \dorecurse{8}{ > \doglobal\appendtocommalist{#1}\slidelist > } > = > % then I define my slide where I increment the counter > \def\startSlide{\setupbackgrounds[page][background=3D{fond,Auteur,backgra= phics,foreground,foregraphics}] > \directsetup{slide:start}} = > \def\stopSlide{\directsetup{slide:stop}} = > \startsetups slide:start = > \page > \incrementnumber[slide] > \switchtobodyfont[14pt] = > \setupinteractionbar[state=3Dstart] = > \startnarrower[left] > \stopsetups = > = > \startsetups slide:stop > \stopnarrower = > \page = > \stopsetups > = > \starttext > = > \doifinset{\getnumber[slide]}{\slidelist} > { > \startSlide > \SlideTitleSub{Hello there} > = > What is my number ? \getnumber[slide] ! > = > \stopSlide > } > \stoptext > = > = > This doesn't work. the "doifinset" doesn't work. I've tried to put some \= expanded in order to expand the arguments with no success. > = > The only way is to use direct argument as : > \doifinset{1}{1,2,3,4,5} > = > Let me know it it is possible. You have to access the counter with \rawcountervalue[] but in = your case you can use a different counter mechanism. \setvariables[slide][list=3D{1,2,3,6,7,8}] % \setupbackgrounds[page][background=3D{fond,Auteur,backgraphics,foreground= ,foregraphics}] \def\startSlide {\increment\SlideCounter \doifinsetelse\SlideCounter{\getvariable{slide}{list}} {\directsetup{slide:start}} {\gobbleuntil\stopSlide}} \def\stopSlide {\directsetup{slide:stop}} = \startsetups slide:start = \page \stopsetups = \startsetups slide:stop \page \stopsetups \starttext \dorecurse{10} {\startSlide {\tfd\recurselevel} \stopSlide} \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________