File: action.rst

package info (click to toggle)
mathjax-docs 3.2%2B20240903-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,184 kB
  • sloc: python: 31; javascript: 28; sh: 20; makefile: 8
file content (53 lines) | stat: -rw-r--r-- 1,276 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.. _tex-action:

######
action
######

The `action` extension gives you access to the MathML ``<maction>``
element.  It defines three new non-standard macros:

.. describe:: \\mathtip{math}{tip}

    Use ``tip`` (in math mode) as tooltip for ``math``.

.. describe:: \\texttip{math}{tip}

    Use ``tip`` (plain text) as tooltip for ``math``.

.. describe:: \\toggle{math1}{math2}...\\endtoggle

    Show ``math1``, and when clicked, show ``math2``, and so on.
    When the last one is clicked, go back to ``math1``.

This extension is loaded automatically when the `autoload` extension
is used.  To load the `action` extension explicitly, add
``'[tex]/action'`` to the ``load`` array of the ``loader`` block of
your MathJax configuration, and add ``'action'`` to the ``packages``
array of the ``tex`` block.

.. code-block:: javascript

   window.MathJax = {
     loader: {load: ['[tex]/action']},
     tex: {packages: {'[+]': ['action']}}
   };

Alternatively, use ``\require{action}`` in a TeX expression to load it
dynamically from within the math on the page, if the `require`
package is loaded.

-----


.. _tex-action-commands:


action Commands
---------------

The `action` extension implements the following macros:
``\mathtip``, ``\texttip``, ``\toggle``


|-----|