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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to