Changes

Jump to navigation Jump to search
96 bytes added ,  18:05, 18 January 2006
==Commands==
 
===Setup===
; <tt>\SetupSteps [...=...,...=...]</tt>
: Setup global options for generation of steps. Available options:
:; <tt>state</tt>
:: <tt><u>start</u></tt>: enable stepping
:: <tt>stop</tt>: disable stepping
:; <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|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>.
 
 
===Step block===
; <tt>\StartSteps ''[sectiontype]'' ''[slide title]'' ... \StopSteps</tt>
: 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.
 
 
===Basic stepping commands===
; <tt>\NextStep</tt>
: Use this as a separation between two steps.
 
; <tt>\AllSteps</tt>
: Use like <tt>\NextStep</tt>, but the content appears on every step.
 
 
===Advanced stepping commands===
 
; <tt>\OnSteps [''step-list''] ''[reserve]'' {...}</tt>
: Show the content on the specified steps from the comma-separated step list. Use dashes for intervals and <tt>...</tt> to denote the first or the last step.
 
; <tt>\HighlightSteps [''step-list''] {...}</tt>
: Highlight content on the specified steps.
 
 
===Alternate stepping commands===
; <tt>\OnlyStep [''n''] ''[reserve]'' {...}</tt>
: Show content only from the first step through the <tt>''n''</tt><sup>th</sup> one.
; <tt>\HighlightStep [''n''] {...}</tt>
: Highlight content on the <tt>''n''</tt><sup>th</sup> step.
===Other settings===
 
; <tt>\CurrentStepNumber</tt>
: Expands to the index (starting at 1) of the step being rendered.
 
; <tt>\StepsRegisterNumber[...]</tt> and <tt>\StepsUnregisterNumber[...]</tt>
: Registers/unregisters a number so that it remains unchanged on a step set. E.g. if you're using <tt>\defineenumeration[Theorem][...]</tt>, then use <tt>\StepsRegisterNumber[Theorem]</tt>.
===Other settings===
; <tt>\UseStepstrue</tt> and <tt>\UseStepsfalse</tt>
: Enable or disable generation of steps.
; <tt>\definecolor [highlightcolor] [blue]</tt>
: Color specification for the <tt>\HighlightStep</tt> command.
 
===Page numbers===
===Preamble===
The following preamble enables page numbering as shown in [[RawSteps#Page numbers|Page Numbers]] in an interaction menu:
<texcode>
===Fancy Advanced stepping===
The following example illustrates the usage of the fancier advanced stepping commands <tt>\OnSteps</tt> and <tt>\HighlightSteps</tt>: <texcode>\StartSteps[Advanced stepping (step \CurrentStepNumber)] \startitemize \OnSteps[1-3,5]{\item Steps 1, 2, 3 and 5.} \OnSteps[2-...]{\item From step 2.} \OnSteps[3] {\item Step 3.} \OnSteps[...-4]{\item Up to step 4.} \stopitemize \StopSteps  \StartSteps[Highlighting (step \CurrentStepNumber)]  \startitemize \item \HighlightSteps[1,4] {Step 1.} \item \HighlightSteps[2] {Step 2.} \item \HighlightSteps[3] {Step 3.} \item \HighlightSteps[4] {Start over from Step 1.} \stopitemize \StopSteps</texcode>  ===Alternate stepping=== The following example illustrates the usage of the alternate stepping commands <tt>\OnlyStep</tt>, <tt>\UntilStep</tt>, <tt>\FromStep</tt>, and <tt>\HighlightStep</tt>:
<texcode>
\OnlyStep [2] {\item This appears only on step 2.}
\UntilStep [4] {\item This will change on step 4.}
\FromStep [43] {\item This has changed since step 4.} \HighlightStep [3] {\item This will be highlighted on step 3.}
\stopitemize
<texcode>
\StartSteps[Navier||Stokes equationEquations]
\placeformula[eq:incompressibilitydivu]
\startformula
\vec\nabla\cdot\vec u = 0
\startformula
\frac{D\vec u}{Dt} =
\FromStepOnSteps[2-...][reserve]{-{\red \frac1\rho \vec\nabla p}} \FromStepOnSteps[3-...][reserve]{+\;{\green \vec g}} \FromStepOnSteps[4-...][reserve]{+\;{\blue \frac1\rho \vec\nabla\cdot S}}
\stopformula
  Incompressibility (\in{eq.}[eq:divu]).  Momentum transport(\in{eq.}[eq:NS]): \NextStepstartitemize \OnSteps[2-...]{\item {\red Pressure gradient} \par\NextStep} \OnSteps[3-...]{\item {\green Gravity} \par\NextStep} \OnSteps[4-...]{\item {\blue Stress (viscous, turbulent, Maxwell)}} \stopitemize
\StopSteps
</texcode>
 
==Development==
Some ideas are liseted about what should be done to improve the module:
* Remove the bug of numbers >10 [http://archive.contextgarden.net/message/20050607.204450.e941be7c.html]
* Fix the <tt>\starttyping</tt> bug [http://archive.contextgarden.net/thread/20050624.164146.00d3e044.html#20050624.164146.00d3e044]
* Write <tt>\OnSteps</tt> macro to accept input like <tt>\OnSteps[1-3,5,7-9,13-last]</tt>. A part of it is (thanks to Taco!) already here, now only a dash still has to be implemented properly. On the basis of this, FromStep,AfterStep,UntilStep can be rewritten to use the \OnSteps mechanism. Well it would be much better to omit them, but I don't know how much care has to be taken for the "backward compatibility", it's no harm if they are left there.
<texcode>
\def\OnSteps[#1]#2%
{\begingroup
\def\processitem##1{\OnlyStep[##1]{#2}}%
\processcommalist[#1]\processitem
\endgroup}
</texcode>
* I don't like the \StartSteps[SubjectName] definition - it doesn't offer enough flexibility. For example, I would like some slides to start with \Title, some with \Subject, ... Also, if I wrote \setuphead[Subject][number=yes], than the subject number was higher on each new slide ... I just noted that I was probably wrong as I saw the \StartSteps[Title][Title name 2] example above.
* I tried to number the formulas once. I probably did that wrong, but I remember that it was not numbered properly
* Enable <tt>\OnlyStep[reserve]</tt> also for text mode, not only for math
* Space reservation could be achieved with a 100% transparent text color....
* Fix some spacing problems [http://archive.contextgarden.net/message/20050607.212822.facbc9b4.html]
* Fancy (tunable) page numbering (perhaps it is already there)
* <tt>\completecontent</tt> has to list each chapter/section/title/subject/... only once
===Slides printing===
These ideas probablt need some more time and are not crucial at the time.
* Enable a sort of switch that would do the same kind of stepping, but with JavaScript instead of raw steps
 
 
== External Links ==
* http://mhd.selfip.info/tex/ - RawSteps module's page
17

edits

Navigation menu