Difference between revisions of "RawSteps"
m (Changed the commands formatting.) |
(Added usage examples.) |
||
Line 9: | Line 9: | ||
: Use this as a separation between two steps. | : Use this as a separation between two steps. | ||
− | ; <tt>\OnlyStep [''n''] {...}</tt> | + | ; <tt>\OnlyStep [''n''] ''[reserve]'' {...}</tt> |
− | : Show content only on the <tt>''n''</tt><sup>th</sup> step. | + | : Show content only on the <tt>''n''</tt><sup>th</sup> step. Usage of the <tt>reserve</tt> keyword is diverted to section [[RawSteps#Reserving space]]. |
− | ; <tt>\FromStep [''n''] {...}</tt> | + | ; <tt>\FromStep [''n''] ''[reserve]'' {...}</tt> |
: Show content only from the <tt>''n''</tt><sup>th</sup> step through the last one. | : Show content only from the <tt>''n''</tt><sup>th</sup> step through the last one. | ||
− | ; <tt>\AfterStep [''n''] {...}</tt> | + | ; <tt>\AfterStep [''n''] ''[reserve]'' {...}</tt> |
: Show content only from the <tt>''n''+1</tt><sup>st</sup> step through the last one. | : Show content only from the <tt>''n''+1</tt><sup>st</sup> step through the last one. | ||
− | ; <tt>\UntilStep [''n''] {...}</tt> | + | ; <tt>\UntilStep [''n''] ''[reserve]'' {...}</tt> |
: Show content only from the first step through the <tt>''n''</tt><sup>th</sup> one. | : Show content only from the first step through the <tt>''n''</tt><sup>th</sup> one. | ||
Line 27: | Line 27: | ||
: Setup global options for generation of steps. Available options: | : Setup global options for generation of steps. Available options: | ||
:; <tt>reserve</tt> | :; <tt>reserve</tt> | ||
− | :: <tt>yes | + | :: <tt>yes</tt>: |
+ | :: <tt><u>no</u></tt>: | ||
:; <tt>defaultsection</tt> | :; <tt>defaultsection</tt> | ||
:: <tt><u>Subject</u>, subject, chapter, ...</tt> | :: <tt><u>Subject</u>, subject, chapter, ...</tt> | ||
+ | : To disable sectioning commands, set <tt>\SetupSteps[defaultsection=page]</tt>. | ||
Line 36: | Line 38: | ||
; <tt>\UseStepstrue</tt> and <tt>\UseStepsfalse</tt> | ; <tt>\UseStepstrue</tt> and <tt>\UseStepsfalse</tt> | ||
− | : Enable or disable steps | + | : Enable or disable generation of steps. |
; <tt>\definecolor [highlightcolor] [blue]</tt> | ; <tt>\definecolor [highlightcolor] [blue]</tt> | ||
Line 42: | Line 44: | ||
+ | ===Page numbers=== | ||
− | '''This is | + | 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. |
+ | |||
+ | <texcode> | ||
+ | \pagenumber{\characters\subpagenumber}/\lastpagenumber | ||
+ | </texcode> | ||
+ | |||
+ | |||
+ | ==Usage example== | ||
+ | |||
+ | |||
+ | ===Preamble=== | ||
+ | |||
+ | The following preamble enables page numbering as shown in [[RawSteps#Page numbers]] in an interaction menu. | ||
+ | |||
+ | <texcode> | ||
+ | \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] | ||
+ | </texcode> | ||
+ | |||
+ | |||
+ | ===Sectioning=== | ||
+ | |||
+ | \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 | ||
+ | </texcode> | ||
+ | |||
+ | |||
+ | ===Fancy stepping=== | ||
+ | |||
+ | The following example illustrates the usage of the fancier stepping commands <tt>\OnlyStep</tt>, <tt>\UntilStep</tt>, <tt>\FromStep</tt>, and <tt>\HighlightStep</tt>. | ||
+ | |||
+ | <texcode> | ||
+ | \StartSteps[Slide Title] | ||
+ | |||
+ | \startitemize | ||
+ | \item This will not change. | ||
+ | \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 | ||
+ | </texcode> | ||
+ | |||
+ | |||
+ | ===Reserving space=== | ||
+ | |||
+ | The <tt>reserve</tt> keyword make 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. | ||
+ | |||
+ | <texcode> | ||
+ | \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 | ||
+ | </texcode> |
Revision as of 17:04, 13 June 2005
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
- \StartSteps [sectiontype] [slide title] ... \StopSteps
- The basic command set 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. Usage of the reserve keyword is diverted to section RawSteps#Reserving space.
- \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.
- \SetupSteps [...=...,...=...]
- Setup global options for generation of steps. Available options:
- reserve
- yes:
- no:
- defaultsection
- Subject, subject, chapter, ...
- To disable sectioning commands, set \SetupSteps[defaultsection=page].
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 example
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
\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 </texcode>
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 not change. \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 make 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