RawSteps
The [raw steps module] allows one to create multi-step slides in presentation without requiring JavaScript. This is achieved by spanning the steps of a slide over multiple document pages.
Contents
Commands
- \SetupSteps [...=...,...=...]
- Setup global options for generation of steps. Available options:
- reserve
- yes: when the item is not active, fill with empty space the area it takes when it is active (see section RawSteps#Reserving space)
- no: when the item is not active, simply skip its generation
- defaultsection
- Subject, subject, chapter, ...
- To disable sectioning commands, set \SetupSteps[defaultsection=page].
- \StartSteps [sectiontype] [slide title] ... \StopSteps
- The basic command pair for steps generation. sectiontype may be any sectioning command, such as chapter, section, subject, etc.
- \NextStep
- Use this as a separation between two steps.
- \OnlyStep [n] [reserve] {...}
- Show content only on the nth step.
- \FromStep [n] [reserve] {...}
- Show content only from the nth step through the last one.
- \AfterStep [n] [reserve] {...}
- Show content only from the n+1st step through the last one.
- \UntilStep [n] [reserve] {...}
- Show content only from the first step through the nth one.
- \HighlightStep [n] {...}
- Highlight content on the nth step.
Other settings
- \UseStepstrue and \UseStepsfalse
- Enable or disable generation of steps.
- \definecolor [highlightcolor] [blue]
- Color specification for the \HighlightStep command.
Page numbers
The module supports subpage numbers. To number pages in a format such as: 1/4, 2a/4, 2b/4, 2c/4, 3a/4, 3b/4, 4/4, use the following code to generate page numbers:
\pagenumber{\characters\subpagenumber}/\lastpagenumber
Usage examples
Preamble
The following preamble enables page numbering as shown in RawSteps#Page numbers in an interaction menu:
\usemodule [pre-original] \usemodule [rsteps] % interaction menu example: % page number with alphabetic subpage number \startinteractionmenu[bottom] \placelist[chapter] [alternative=bottom,criterium=all,pagenumber=no] \\ \pagenumber{\characters\subpagenumber}/\lastpagenumber \stopinteractionmenu % setup example (default) \SetupSteps[defaultsection=Subject,reserve=no]
Sectioning
The following illustrates different usage schemes of the \StartSteps ... \StopSteps pair:
\StartSteps[Topic][Topic Title] This is a topic slide. \NextStep Another step. \StopSteps \StartSteps[Subject][Subject Title 1] This is a subject slide. \NextStep Another step. \StopSteps \StartSteps[Subject Title 2] This is a subject (defaultsection) slide as well. \NextStep Another step. \StopSteps \StartSteps This slide comprises no section command. \NextStep Another step. \StopSteps
Fancy stepping
The following example illustrates the usage of the fancier stepping commands \OnlyStep, \UntilStep, \FromStep, and \HighlightStep:
\StartSteps[Slide Title] \startitemize \item This will always appear. \OnlyStep [2] {\item This appears only on step 2.} \UntilStep [4] {\item This will change on step 4.} \FromStep [4] {\item This has changed since step 4.} \HighlightStep [3] {\item This will be highlighted on step 3.} \stopitemize \StopSteps
Reserving space
The reserve keyword makes the item appear as empty space when it is not active instead of not generating the item at all. It is particularly useful in typesetting equations, as shown by the following example:
\StartSteps[Navier||Stokes equation] \placeformula[eq:incompressibility] \startformula \vec\nabla\cdot\vec u = 0 \stopformula \placeformula[eq:NS] \startformula \frac{D\vec u}{Dt} = \FromStep[2][reserve]{-{\red \frac1\rho \vec\nabla p}} \FromStep[3][reserve]{+\;{\green \vec g}} \FromStep[4][reserve]{+\;{\blue \frac1\rho \vec\nabla\cdot S}} \stopformula Momentum transport: \NextStep \item {\red Pressure gradient} \par\NextStep \item {\green Gravity} \par\NextStep \item {\blue Stress (viscous, turbulent, Maxwell)} \StopSteps