From: Otared Kavian <otared@wanadoo.fr>
Subject: Re: \presentationstep
Date: Wed, 3 Nov 2004 09:35:00 +0100 [thread overview]
Message-ID: <p06110402bdae48b1a915@[10.0.1.7]> (raw)
At 18:38 -0500 2/11/04, David Munger wrote:
>
>I think the latest Acrobat Reader version for Linux is 5.0.9. I guess
>this means I should forget about steps. Thanks anyway.
>
>David
>
Hi David,
A few months ago I had to use steps in my presentations, but since I
could not use thouroughly s-pre-60.tex (and the examples given in
s-pre-61.tex) I ended up
writing a few macros which work fine with ConTeXt and the presentation modules.
These macros are very elementary and crude, but they work...
If I succeed to learn how to use layers smartly as does Hans, I will
write these macros again. :-)
Below are the macros and some examples.
Best regards: OK
%%%%%%%%%%%% begin test-step-ok.tex
%%K test-step-ok.tex
%%K Here we use the plain \TeX\ command \phantom{} in order to have
%%K some material appear step by step.
%%K The structure is quite simple, but since I am not very
%%K familiar with ConTeXt, I cannot write elegant code as does
%%K Hans Hagen...
%%K
%%K An advantage is that the code can be used also in
%%K plain TeX, in LaTeX and other macro-packages.
%%K
\newif\ifSteppingSlide
\SteppingSlidetrue %%K this is when you want a step by step presentation
%\SteppingSlidefalse %%K this is when you want to print the slides
%
\newcount\StepsCounter
\StepsCounter=0
%
\newcount\NumberOfSteps
\NumberOfSteps=10
%
\newcount\BeforeStepNumber
\BeforeStepNumber=0
%
%%K StepBetween[number1,number2]{material} will make "material"
%%K appear between steps "number1" and "number2"
\def\StepBetween[#1,#2]#3{%
\ifSteppingSlide
\ifnum#1>\StepsCounter \phantom{#3}
\else
\ifnum#2<\StepsCounter \phantom{#3}
\else \relax #3
\fi
\fi
\else {#3}
\fi}
%
%%K Step{number1}{material} will make "material"
%%K appear beginning with step "number1" until "NumberOfSteps"
\def\Step#1#2{\StepBetween[#1,\NumberOfSteps]{#2}}
%
%%K OnlyStep{number1}{material} will make "material"
%%K appear only on step "number1"
\def\OnlyStep#1#2{\StepBetween[#1,#1]{#2}}
%
%%K StepBefore{number1}{material} will make "material"
%%K appear only on all steps before "number1"
\def\StepBefore#1#2{
\global\BeforeStepNumber=#1
\StepBetween[0,\BeforeStepNumber]{#2}}
%
\long\def\SlideWithSteps#1#2{
\ifSteppingSlide
\global\StepsCounter=0
\global\NumberOfSteps=#1
\MakeSteps{#2}
\else #2
\fi}
%
\long\def\MakeSteps#1{\loop #1
\ifnum\StepsCounter<\NumberOfSteps
\global\advance\StepsCounter by 1\vfill\eject
\repeat
\vfill\eject}
%
%%K This is the end of the macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \endinput
%%K Here is a sample of how you can use these macros
%%K
\starttext
\startitemize
\SlideWithSteps{8}{
\item Consider the following nonlinear equation:
$$\Step{8}{{\partial u \over \partial t}} \Step{1}{-\Delta u +
|u|^{p-1}u} \Step{2}{=} \Step{3}{f} \Step{4}{+{\rm div}(g)}
\Step{5}{+|\nabla u|{\Step{6}{^2}}}$$
\StepBetween[3,5]{\item This line appears only between steps 3 and 5}
\Step{8}{\item The equation may be parabolic.}
\StepBefore{4}{\item This line appears only before step 4.}
\OnlyStep{4}{\item This line appears only at step 4.}
\vfill (Here you see step number \the\StepsCounter)
} % end of \SlideWithSteps
\stopitemize
\page
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
next reply other threads:[~2004-11-03 8:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 8:35 Otared Kavian [this message]
2004-11-03 16:42 ` \presentationstep David Munger
2004-11-03 17:25 ` \presentationstep Otared Kavian
2004-11-06 8:07 ` \presentationstep David Munger
2004-11-07 22:10 ` \presentationstep Otared Kavian
2004-11-08 0:57 ` \presentationstep David Munger
2004-11-08 12:59 ` \presentationstep Otared Kavian
2004-11-08 18:01 ` \presentationstep David Munger
2004-11-08 20:02 ` \presentationstep Otared Kavian
2004-11-08 21:10 ` \presentationstep David Munger
2004-11-10 14:51 ` \presentationstep Otared Kavian
2004-11-10 17:08 ` \presentationstep David Munger
2004-11-10 17:39 ` \presentationstep Hans Hagen
2004-11-10 18:08 ` \presentationstep David Munger
2004-11-10 18:44 ` \presentationstep Otared Kavian
2004-11-10 18:25 ` \presentationstep Vit Zyka
2004-11-10 19:05 ` \presentationstep Otared Kavian
-- strict thread matches above, loose matches on Subject: below --
2004-11-02 6:04 \presentationstep David Munger
2004-11-02 7:45 ` \presentationstep Henning Hraban Ramm
2004-11-02 9:58 ` \presentationstep Hans Hagen
2004-11-02 22:22 ` \presentationstep David Munger
2004-11-02 22:55 ` \presentationstep h h extern
2004-11-02 23:38 ` \presentationstep David Munger
2004-11-03 9:39 ` \presentationstep Hans Hagen
2004-11-09 10:18 ` \presentationstep Eckhart Guthöhrlein
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='p06110402bdae48b1a915@[10.0.1.7]' \
--to=otared@wanadoo.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).