ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: \presentationstep
@ 2004-11-03  8:35 Otared Kavian
  2004-11-03 16:42 ` \presentationstep David Munger
  2004-11-06  8:07 ` \presentationstep David Munger
  0 siblings, 2 replies; 25+ messages in thread
From: Otared Kavian @ 2004-11-03  8:35 UTC (permalink / 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

^ permalink raw reply	[flat|nested] 25+ messages in thread
* \presentationstep
@ 2004-11-02  6:04 David Munger
  2004-11-02  7:45 ` \presentationstep Henning Hraban Ramm
  2004-11-09 10:18 ` \presentationstep Eckhart Guthöhrlein
  0 siblings, 2 replies; 25+ messages in thread
From: David Munger @ 2004-11-02  6:04 UTC (permalink / raw)


Hi,

Could someone tell me if I'm doing something bad here, please?

File test.tex
-------------------------------
\usemodule[pre-original]
\starttext
\Subject{Test}
step 1
\presentationstep
step 2
\stoptext
-------------------------------
texexec --mode=step --output=pdf test.tex

This gives me a white page instead of the text I get without
`--mode=step'.

Thanks for any help,

David

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2004-11-10 19:05 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-03  8:35 \presentationstep Otared Kavian
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

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).