Changes

Jump to navigation Jump to search
1,357 bytes added ,  10:02, 6 October 2014
add example of animation module with formulae
* making <b>multiple pages</b> and (quickly) browse through them
* using <b>[[JavaScript]]</b>
* using <b>[[modules:animation|the animation module]]</b>
* (probably one day [[SVG]] will enable that too)
The first alternative can be hardcoded, achieved with either some trickery (<cmd>dorecurse</cmd> may sometimes help you) or with support of mudules modules such as [[RawSteps]].
This page will mostly deal with <b>[[JavaScript]]</b> animations.
* pdfclock
* [[5BarMechAnim|Animation of a five bar mechanism]]
 
== Using [[modules:animation|the animation module]] ==
 
=== Simple example ===
<texcode>
\usemodule[animation]
\setupinteraction[state=start]
 
\starttext
 
\startanimation
{\externalfigure[dummy]A}
{\externalfigure[dummy]B}
{\externalfigure[dummy]C}
{\externalfigure[dummy]D}
\stopanimation
 
\stoptext
</texcode>
 
 
=== Add captions ===
<texcode>
\usemodule[animation]
\setupinteraction[state=start]
 
\definepairedbox[animationtext][location=top,align=middle,width=\textwidth]
 
\starttext
 
\startanimation
{\placeanimationtext{The letter a}{\externalfigure[dummy]}}
{\placeanimationtext{The letter b}{\externalfigure[dummy]}}
{\placeanimationtext{The letter c}{\externalfigure[dummy]}}
{\placeanimationtext{The letter d}{\externalfigure[dummy]}}
\stopanimation
 
\stoptext
</texcode>
 
=== Example with formulae ===
<texcode>
\usemodule[animation]
 
\setuppapersize[S6][S6]
 
\setupinteraction[state=start]
 
\definepairedbox[animationtext][location=top,align=middle,width=\textwidth]
 
\starttext
 
\startanimation
{\placeanimationtext{Sine norm, and}{\startformula \int_{0}^{2\pi}\sin^2(x)dx = \stopformula}}
{\placeanimationtext{Cosine norm}{\startformula\int_{0}^{2\pi}\cos^2(x)dx = \stopformula}}
{\placeanimationtext{are equal}{\startformula = \pi. \stopformula}}
\stopanimation
 
\stoptext
</texcode>
== Animating Text ==

Navigation menu