> Am 08.11.2014 um 00:00 schrieb Pierre-François Bonnefoi <bonne...@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
___________________________________________________________________________________

Reply via email to