ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Pierre-François Bonnefoi" <bonnefoi@unilim.fr>
To: ntg-context@ntg.nl
Subject: [doifinset] how it works ?
Date: Thu, 21 Aug 2014 21:58:24 +0200	[thread overview]
Message-ID: <A7944AD5-B5F2-46D3-9911-90476281AE95@unilim.fr> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2052 bytes --]

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 select 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 to each slide is made according to its definition in the file and not the slide number displayed;
4 - a block is added to enclosed each slide in order to allow or not it to be shown in the final presentation.

\definenumber[slide][way=bytext,prefix=no]
% 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={fond,Auteur,backgraphics,foreground,foregraphics}]
\directsetup{slide:start}} 
\def\stopSlide{\directsetup{slide:stop}} 
\startsetups slide:start 
\page
\incrementnumber[slide]
\switchtobodyfont[14pt] 
\setupinteractionbar[state=start] 
\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.

best regards,
Pierre-François Bonnefoi.
-- 
Bonnefoi Pierre-Francois                |    E-mail : bonnefoi@unilim.fr http://libpfb.so/
Universite de Limoges, Laboratoire XLIM |       Tel : 06 28 18 03 38
123 av Albert Thomas                    |  Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE            |                 The Avengers.


[-- Attachment #1.2: Type: text/html, Size: 7852 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2014-08-21 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 19:58 Pierre-François Bonnefoi [this message]
2014-08-21 20:28 ` Otared Kavian
2014-08-21 20:30 ` Otared Kavian
2014-08-22  4:47 ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A7944AD5-B5F2-46D3-9911-90476281AE95@unilim.fr \
    --to=bonnefoi@unilim.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).