Table of contents
- Slip-specific tags
- Slip-specific classes
at
attributespause
attributesat-unpause
attributes- Slip scripting
slip.query
slip.queryAll
slip.delay
slip.reveal
slip.downTo
slip.centerTo
slip.upTo
slip.focus
slip.unfocus
slip.setAction
slip.setNthAction
slip.getEngine
engine.getRoot
engine.start
engine.restart
engine.getController
engine.gotoSlip
engine.push
engine.next
engine.enter
Slipshow.startSlipshow
Slipshow.Slip
Slipshow.Engine
We list here the custom tags that are specific to slipshow.
The root of a slipshow.
A slip.
The title of a slip.
The body of a slip.
A TikZ figure. This custom element extends the elementimg
, thus it has to be written like this:<img is="slip-figure" figure-name="fig"/>
. A figure can be created withnpx new-figure
, and the name should correspond.
We list here the class that can be given to elements that are specific to slipshow.
Make an element invisible. Can be made visible with :ref:`mk-visible-at` or :ref:`chg-visib-at`.
Make an element move smoothly when moved using the not yet implemented move-element-to
.
Emphasize the element.
If a slip has this class, the content will not be centered vertically. That is, even if there is only one line, it will appear in the top, and not in the middle.
Here, we list the attributes that act at predefined steps of the presentation.
If an element has attributemk-visible-at="n"
, then it will be made visible at step n. It only has an effect if the element is hidden, for instance bymk-hidden-at
or theinvisible
class.
If an element has attribute mk-hidden-at="n"
, then it will be hidden at step n.
If an element has attributemk-emphasize-at="n"
, then it will be given theemphasize
class at step n.
If an element has attributemk-unemphasize-at="n"
, then it will be removed theemphasize
class at step n.
If an element has attribute emphasize-at="n0 n1 n2 ..."
, then it will be emphasized exactly at steps n_0, n_1, n_2, ...
If an element has attributechg-visib-at="n0 n1 n2 ..."
, then it will hidden at step 0, it will be made visible at positive steps n_i, and it will be hidden at negative steps n_j. For instance,chg-visib-at="2 -5 8"
will first appear hidden, then visible at step 2, invisible at step 5 and visible again at step 8.
If an element has attribute up-at="n"
, then the window will move at step n so that the element appear at the top of the screen.
If an element has attribute down-at="n"
, then the window will move at step n so that the element appear at the bottom of the screen.
If an element has attribute center-at="n"
, then the window will move at step n so that the element appear at the center of the screen.
If an element has attribute focus-at="n"
, then the window will move at step n so that the element takes all the screen.
If an element has attribute unfocus-at="n"
at step n, and the window was focusing on an element, then the window will return to its original place.
If an element has attributestatic-at="n0 n1 n2 ..."
, then it will be added to the text flow at positive steps n_i, and removed from the text flow at steps n_j. Note that this does not work by modifying thestatic
css property, but rather by setting the css propertiesposition: absolute
andvisibility: hidden
. This is done so that mathjax can compute the size of the elements that includes math, it cannot when an element is not static.
If an element has attribute exec-at="n"
, then its content will be executed at step n. See :ref:`slip-scripting` for more information on the execution of a script.
If aslip-figure
element has attributefigure-next-at="n1 n2 n3"
, then the next overlay will be shown at every step n_i. See :ref:`slip-figure` for more information on a figure.
Here, we list all the attributes that are linked with the pause
mechanism. At each step of the slipshow, the first pause attribute acts, and is removed. We describe what are the action of each pause attributes.
If an element has apause
attribute, all elements appearing after it will be hidden. Apause
attribute, when acting, only disappear, revealing the content of the slip until the next pause attribute. Apause
attribute can have a value: if an element haspause="n"
, then it will take 5 steps to disappear.
Astep
attribute, when acting, only disappear. This does nothing but allows to make a stop in the pause flow. Astep
attribute can have a value: if an element hasstep="n"
, then it will take 5 steps to disappear. This attribute is mostly useful in combinaison with the :ref:`at-unpause-attributes`.
When given focus, a slip with the auto-enter
attribute will be entered.
One step before being given focus, a slip with the immediate-enter
attribute will be entered. This is needed so that slips are entered directly, and not after one action.
When an element has focus from the pause mechanism, and its attribute is removed (for instance, after 5 focus if it has pause="5"
), we say that the element is unpaused.
When an element with theup-at-unpause
attribute is unpaused, the window will move so that the element appear at the top of the screen. If the attribute has a value, e.g.up-at-unpause="id"
, then the element with idid
will be put at the top of the screen instead.
When an element with thedown-at-unpause
attribute is unpaused, the window will move so that the element appear at the bottom of the screen. If the attribute has a value, e.g.down-at-unpause="id"
, then the element with idid
will be put at the bottom of the screen instead.
When an element with thecenter-at-unpause
attribute is unpaused, the window will move so that the element appear at the center of the screen. If the attribute has a value, e.g.center-at-unpause="id"
, then the element with idid
will be put at the center of the screen instead.
When an element with thefocus-at-unpause
attribute is unpaused, the window will move so that the element takes all the screen. If the attribute has a value, e.g.focus-at-unpause="id"
, then the element with idid
will be the one taking all the screen instead.
When an element with the focus-at-unpause
attribute is unpaused, and the window was focusing on an element, the window will return to its original place.
When an element with theexec-at-unpause
attribute is unpaused, the content of the element will be executed. If the attribute has a value, e.g.exec-at-unpause="id"
, then the element with idid
will be executed instead. See :ref:`slip-scripting` for more information on the execution of a script.
When an element with thestatic-at-unpause
attribute is unpaused, the element will be made "static" at unpause. If the attribute has a value, e.g.static-at-unpause="id1 id2 ..."
, then the element with those ids will be made static at unpause. By "made static" we mean the css stylingposition:static; visibility:visible
will be applied.
When an element with theunstatic-at-unpause
attribute is unpaused, the element will be made "unstatic" at unpause. If the attribute has a value, e.g.unstatic-at-unpause="id1 id2 ..."
, then the element with those ids will be made unstatic at unpause. By "made unstatic" we mean the css stylingposition:absolute; visibility:hidden
.
When an element with thereveal-at-unpause
attribute is unpaused, the element will be "revealed" at unpause. If the attribute has a value, e.g.reveal-at-unpause="id1 id2 ..."
, then the element with those ids will be "revealed" at unpause. By "revealed" we mean the css stylingopacity:1
will be applied.
When an element with thefigure-next-at-unpause
attribute is unpaused, the element (provided it is a slip-figure, that is an element<img is="slip-figure"/>
) will show the next overlay of the figure. If the attribute has a value, e.g.reveal-at-unpause="id1 id2 ..."
, then this will happen for every figures with one of those ids. See :ref:`slip-figure` for more information on a figure.
When an element with thefigure-set-at-unpause="id overlay"
attribute is unpaused, the element of idid
(provided it is a slip-figure, that is an element<img is="slip-figure"/>
) will show the overlayoverlay
of the figure. See :ref:`slip-figure` for more information on a figure.
When an element with theenter-at-unpause="id"
attribute is unpaused, the slip of idid
will be entered wen the element with the attribute is unpaused.
A slip script can be executed either with :ref:`exec-at`, :ref:`exec-at-unpause`, :ref:`setAction`, or :ref:`setNthAction`. It consists of plain javascript, with an additional variable slip
containing the slip inside which it is executed.
A function that takes a string consisting of acss
selector as input. Works asquerySelector
except that it does not select inside the subslips.
A function that takes a string consisting of acss
selector as input. Works asquerySelectorAll
except that it does not select inside the subslips.
An integer telling the time taken by the camera
to move when entering this slip.
A function to "reveal" the elements with classunrevealed
. Argument can be either the element to reveal, or acss
selector.
A function to move the camera so that the element appears at the bottom of the view. First argument can be either an element, or a css
selector. Second argument is optionnal, and is the margin from the bottom.
A function to move the camera so that the element appears at the center of the view. First argument can be either an element, or a css
selector.
A function to move the camera so that the element appears at the top of the view. First argument can be either an element, or a css
selector. Second argument is optionnal, and is the margin from the top.
A function to move the camera so that the element takes the entire screen. First argument can be either an element, or a css
selector.
A function to return the camera to where it was before a focus
to an element. No arguments.
Function to set the action list of a slip. Takes a list of functions as input.
Function to set then
-th action of a slip. Takes an integern
and a function as input.
Function with no arguments that returns the engine used by a slip.
Returns the "root slip", which is slip containing all the presentation, of an engine.
Starts the engine.
Restarts the engine.
Function with no arguments that returns the controller used by an engine.
engine.push(slip); // add the slip to the stack of slips of the engine engine.next();
Move the window to show the slip. Takes as arguments aSlip
, and a js objectoptions
with fielddelay
.
Function that pushes the slip given as input in the slip stack of the engine.
Function with no arguments to make one step in the presentation.
Makes the engine effectively enter the slip given as input. This is equivalent to agotoSlip
followed by apush
and anext
.
Create an engine with root slip the element of tag slip-slipshow
, starts it, and returns it.
A slip object constructor. Takes as arguments: thename
, thefullName
, theactionList
, theengine
and a js objectoptions
with fieldfirstVisit
endinit
that are called respetively when entering the slip, and when initialising the slip.
An engine object constructor. Takes as arguments: theroot
of the engine, which can be either an element, acss
selector or undefined (and in this case, it defaults to the element with tagslip-slipshow
).