# Stepper

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Another way to show materials step by step in your presentation is using the RawSteps module. However that approach is going to create a page for each step, so that your presentation document may end up clogged with too many pages. Nevertheless it has the advantage of being able to go backward through the steps, and the resulted PDF file may be viewed in any PDF viewer.

Here we give an example using the Stepper which is buit in ConTeXt. In order to use it one has to add the following lines at the beginning of the source file:

\usemodule[pre-60] % use the stepper

\defineoverlay[invoke][\overlaybutton{InvokeStepper}]
\setupbackgrounds[text]
[background=invoke]
\setupinteraction[state=start,click=off]


After doing this the following example shows how things work:

\usemodule[pre-60] % use the stepper
\setuppapersize[S6][S6]

\defineoverlay[invoke][\overlaybutton{InvokeStepper}]
\setupbackgrounds[text]
[background=invoke]
\setupinteraction[state=start,click=off]

\starttext
\title{Steps in \CONTEXT}
In the next slide we are going to see items appearing step by step.

\title{Just a test to see the stepper}
\StartSteps
\startitemize[packed]
\startitem This \FlushStep \stopitem
\startitem This is \FlushStep \stopitem
\startitem This is shown \FlushStep \stopitem
\startitem This is shown step \FlushStep \stopitem
\startitem This is shown step by\FlushStep \stopitem
\startitem This is shown step by step \FlushStep \stopitem
\stopitemize
\StopSteps

\title{Another test to see the stepper}

\StartSteps
This \FlushStep{} is \FlushStep{} shown \FlushStep{} step \FlushStep{}
by\FlushStep{} step. \FlushStep
\StopSteps

\title{Another test to see the stepper in maths}
\StartSteps
These two functions  \FlushStep{}
$x \mapsto \sin^2(x)$  \FlushStep{}
and $x \mapsto x$ \FlushStep{}
have the same integral on $[0,1]$ {} \FlushStep
\startformula
\int_{0}^{\pi} \sin^2(x)dx \FlushStep = \int_{0}^{1} xdx \FlushStep
= {1 \over 2} \FlushStep
\stopformula
\StopSteps

\stoptext


Notice that the resulting PDF file must be viewed in a PDF viewver such as Acrobat Reader (the stepping procedure doesn't ork in Apple's Preview.app, nor in TeXShop).