From: Aditya Mahajan <adityam@umich.edu>
To: "Vedran Miletić" <rivanvx@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: slide steps again
Date: Mon, 25 Apr 2011 11:24:45 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.01.1104251118550.3715@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <BANLkTinmEsp-sDcNMP69E3WKxq_gLM+sbA@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1818 bytes --]
On Mon, 25 Apr 2011, Vedran Miletić wrote:
> 2011/3/7 Aditya Mahajan <adityam@umich.edu>
>
>> 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
[-- 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
___________________________________________________________________________________
next prev parent reply other threads:[~2011-04-25 15:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 23:05 Curiouslearn
2011-03-06 23:21 ` Aditya Mahajan
2011-03-06 23:54 ` Curiouslearn
2011-04-25 11:57 ` Vedran Miletić
2011-04-25 15:24 ` Aditya Mahajan [this message]
2011-03-07 0:17 Jeong Dalyoung
2011-03-07 9:41 ` Curiouslearn
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=alpine.LNX.2.01.1104251118550.3715@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
--cc=rivanvx@gmail.com \
/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).