Revealing MathJax Equations (Continued)
- Toggles can be nested:
\[
(x+1)^2 =
\toggle
{\rlap{?}\phantom{(x+1)(x+1) = x^2 + 2x + 1}}
{(x+1)(x+1) =
\toggle
{\rlap{?}\phantom{x^2 + 2x + 1}}
{x^2 + 2x + 1}
\endtoggle}
\endtoggle
\]
- Toggles can "highlight" expressions:
\[
\toggle{a^2}{\color{red}{a^2}}\endtoggle +
\toggle{b^2}{\color{red}{b^2}}\endtoggle =
\toggle{c^2}{\color{red}{c^2}}\endtoggle
\]
- Toggles can cycle through more than two :
\[
\toggle{x+1}{x+2}{x+3}\endtoggle
\]
- Toggles also require the
action
extension.
MathJax.Hub.Config({
TeX: {extensions: ["action.js"]}
});
|