ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Pierre-François Bonnefoi" <bonnefoi@unilim.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ConTeXt gobble my mind
Date: Sun, 9 Nov 2014 14:34:01 +0100	[thread overview]
Message-ID: <B42DFF7A-7EA9-41C5-8DB2-2AE28B81AF1E@unilim.fr> (raw)
In-Reply-To: <CF4D7BCC-9AEE-483F-8C46-8752651249A5@gmail.com>


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

Hello Wolfgang,

thank you very much for all these solutions.
Do you have any recommendations about using one over the others ?

Currently, the conditional selection of my slides works pretty good : I have created the following macros :
 \courseSlideList[resavi][1-10,20-30,34,37-40], this macro allows me to activate all the slides given by their number in a list defined in the current file ;
 \includeSelectionFrom{adressage_groupe_utf8}{1-100} this macro allows me to include some slides given by a list of number from an external file ;
 \skipSlide that can suppress the process of the following slide.

Of course, all of theses macros work beautifully recursively with files using them (the numbering macro work nicely on currently defined slides as included slides).

This is why I use only ConTeXt for all my work !

Cheers !
Pierre-François.


On 08 Nov 2014, at 12:08, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> 
>> Am 08.11.2014 um 00:00 schrieb Pierre-François Bonnefoi <bonnefoi@unilim.fr>:
>> 
>> Just before going to bed, I've found a solution with all your help and the help of Taco Hoekwater through the ntg mail archive :
>> 
>> \def\startSlide%
>> {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}%
>> \dostartbuffer[Slide][startSlide][stopSlide]}
>> 
>> Let me know if it's my philosopher's stone...
>> I've tried it and it works so far.
>> 
>> No more ugly gobbling, my mind is free.
> 
> Below are two other methods.
> 
> 
> Method 1
> =======
> 
> \newconditional\SkipSlide \setfalse\SkipSlide
> 
> \definebuffer[Slide]
> 
> \def\stopSlide
>  {\ifconditional\SkipSlide \else
> 	 \page \getbuffer[\thedefinedbuffer{Slide}]%
>   \fi
>   \setfalse\SkipSlide}
> 
> \starttext
> 
> \startSlide
> First Slide
> \stopSlide
> 
> \settrue\SkipSlide
> \startSlide
> Second Slide
> \stopSlide
> 
> \startSlide
> Third Slide
> \stopSlide
> 
> \stoptext
> 
> 
> Method 2
> =======
> 
> \def\startSlide
>  {\dosingleempty\dostartSlide}
> 
> \def\dostartSlide[#1]%
>  {\doifelse{#1}{-}
>     {\let\stopSlide\stopSlideNop}
>     {\let\stopSlide\stopSlideYes}%
>   \grabbufferdata[Slide][startSlide][stopSlide]}
> 
> \let\stopSlideNop\relax
> 
> \def\stopSlideYes
>  {\page
>   \getbuffer[Slide]}
> 
> \starttext
> 
> \startSlide
> First Slide
> \stopSlide
> 
> \startSlide[-]
> Second Slide
> \stopSlide
> 
> \startSlide
> Third Slide
> \stopSlide
> 
> \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
> ___________________________________________________________________________________

-- 
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: 9331 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-11-09 13:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06  9:35 Pierre-François Bonnefoi
2014-11-06 11:16 ` luigi scarso
2014-11-06 12:36   ` Pierre-François Bonnefoi
2014-11-06 12:46     ` luigi scarso
2014-11-06 13:00     ` Herbert Voss
2014-11-06 13:30       ` Pierre-François Bonnefoi
2014-11-06 12:12 ` Wolfgang Schuster
2014-11-06 12:59   ` Pierre-François Bonnefoi
2014-11-06 13:12     ` luigi scarso
2014-11-06 13:29       ` Pierre-François Bonnefoi
2014-11-07 11:38         ` Hans Hagen
2014-11-07 13:26           ` Pierre-François Bonnefoi
2014-11-07 15:17             ` Hans Hagen
2014-11-07 23:00               ` Pierre-François Bonnefoi
2014-11-08 11:08                 ` Wolfgang Schuster
2014-11-09 13:34                   ` Pierre-François Bonnefoi [this message]
2014-11-09 14:17                     ` Hans Hagen
2014-11-06 16:57 ` Keith J. Schultz
2014-11-07 10:59   ` Pierre-François Bonnefoi

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=B42DFF7A-7EA9-41C5-8DB2-2AE28B81AF1E@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).