On Mon, 25 Apr 2011, Vedran Miletić wrote:

2011/3/7 Aditya Mahajan <[email protected]>

On Sun, 6 Mar 2011, Curiouslearn wrote:

 I am making some slides using the Swoosh style in simpleslides module.
I wanted to reveal some content sequentially.


simpleslides does not support stepwise presentation of material.

I occasionally use the following macros for quick and dirty stepwise
effects. This is for really simple material (no counters, no glues ...)

\usemodule[simpleslides][style=Swoosh]
\def\StartSteps#1#2\StopSteps%
  {\dorecurse{#1}{\long\setvalue{\recurselevel}{\gobble}}
   \dorecurse{#1}{\long\setvalue{\recurselevel}{\oneofone} #2}}

\long\def\gobble#1{}
\long\def\oneofone#1{#1}

\starttext
\StartSteps{3}

\SlideTitle{Context can be used for \dots}

\null

\startitemize[n]
 \2{\item Writing your articles}

 \3{ \item Making slides for presentations }
\stopitemize

\StopSteps

\stoptext


Hi,

this is awesome, but could you please explain why it works? I don't understand what is defined by \def\StartSteps#1#2\StopSteps and also

\def\StartSteps#{count}#{body}\StopSteps
   {% Initialization
    % for i = 1 upto count :
    %   set csname(i) = gobble
    \dorecurse{#{count}}{\long\setvalue{\recurselevel}{\gobble}}
    %
    % Now typeset #{body} for #{count} number of times.
    % In each iteration set csname(i) = oneofone
    \dorecurse{#{count}}
        {\long\setvalue{\recurselevel}{\oneofone}%
         #2}}

why are \gobble and \oneofone used in such a way when they are single-argument commands.

I could have just \letvalue{\recurselevel}\gobble and \letvalue{\recurselevel}\oneofone.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 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