Difference between revisions of "RawSteps"
(Added usage examples.) |
m (Describe the reserve keyword. Fix some errors.) |
||
Line 2: | Line 2: | ||
==Commands== | ==Commands== | ||
+ | |||
+ | ; <tt>\SetupSteps [...=...,...=...]</tt> | ||
+ | : Setup global options for generation of steps. Available options: | ||
+ | :; <tt>reserve</tt> | ||
+ | :: <tt>yes</tt>: when the item is not active, fill with empty space the area it takes when it is active (see section [[RawSteps#Reserving space]]) | ||
+ | :: <tt><u>no</u></tt>: when the item is not active, simply skip its generation | ||
+ | :; <tt>defaultsection</tt> | ||
+ | :: <tt><u>Subject</u>, subject, chapter, ...</tt> | ||
+ | : To disable sectioning commands, set <tt>\SetupSteps[defaultsection=page]</tt>. | ||
; <tt>\StartSteps ''[sectiontype]'' ''[slide title]'' ... \StopSteps</tt> | ; <tt>\StartSteps ''[sectiontype]'' ''[slide title]'' ... \StopSteps</tt> | ||
− | : The basic command | + | : The basic command pair for steps generation. <tt>''sectiontype''</tt> may be any sectioning command, such as <tt>chapter</tt>, <tt>section</tt>, <tt>subject</tt>, etc. |
; <tt>\NextStep</tt> | ; <tt>\NextStep</tt> | ||
Line 10: | Line 19: | ||
; <tt>\OnlyStep [''n''] ''[reserve]'' {...}</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. |
; <tt>\FromStep [''n''] ''[reserve]'' {...}</tt> | ; <tt>\FromStep [''n''] ''[reserve]'' {...}</tt> | ||
Line 24: | Line 33: | ||
: Highlight content on the <tt>''n''</tt><sup>th</sup> step. | : Highlight content on the <tt>''n''</tt><sup>th</sup> step. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 46: | Line 47: | ||
===Page numbers=== | ===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 | + | 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> | <texcode> | ||
Line 53: | Line 54: | ||
− | ==Usage | + | ==Usage examples== |
===Preamble=== | ===Preamble=== | ||
− | The following preamble enables page numbering as shown in [[RawSteps#Page numbers]] in an interaction menu | + | The following preamble enables page numbering as shown in [[RawSteps#Page numbers]] in an interaction menu: |
<texcode> | <texcode> | ||
Line 79: | Line 80: | ||
===Sectioning=== | ===Sectioning=== | ||
+ | The following illustrates different usage schemes of the <tt>\StartSteps ... \StopSteps</tt> pair: | ||
+ | |||
+ | <texcode> | ||
\StartSteps[Topic][Topic Title] | \StartSteps[Topic][Topic Title] | ||
This is a topic slide. | This is a topic slide. | ||
Line 107: | Line 111: | ||
===Fancy stepping=== | ===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> | + | 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> | <texcode> | ||
Line 113: | Line 117: | ||
\startitemize | \startitemize | ||
− | \item This will | + | \item This will always appear. |
− | \OnlyStep[2] | + | \OnlyStep [2] {\item This appears only on step 2.} |
− | \UntilStep[4] {\item This will change on step 4.} | + | \UntilStep [4] {\item This will change on step 4.} |
− | \FromStep[4] | + | \FromStep [4] {\item This has changed since step 4.} |
− | \HighlightStep[3]{\item This will be highlighted on step 3.} | + | \HighlightStep [3] {\item This will be highlighted on step 3.} |
\stopitemize | \stopitemize | ||
Line 126: | Line 130: | ||
===Reserving space=== | ===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 | + | 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> | <texcode> |
Revision as of 17:15, 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
- \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 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