maction

Summary

The MathML <maction> element provides a possibility to bind actions to (sub-) expressions.
The action itself is specified by the actiontype attribute, which accepts several values. To specify which child elements are addressed by the action, you can make use of the selection attribute.

Attributes

actiontype
The action which specifies what happens for this element. Possible values are:
  • statusline: If there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. The syntax is: <maction actiontype="statusline"> expression message </maction>.
  • toggle: When there is a click on the subexpression, the rendering alternates the display of selected subexpressions. Therefore each click increments the selection value.
    The syntax is: <maction actiontype="toggle" selection="positive-integer" > expression1 expression2 expressionN </maction>.
  • tooltip: When the pointer moves over the expression, a tooltip box with a message is displayed near the expression.
    The syntax is: <maction actiontype="tooltip"> expression message </maction>.
class, id, style
Provided for use with stylesheets.
href
Used to set a hyperlink to a specified URI.
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor
The text color and also the fraction line color. You can use #rgb, #rrggbb and HTML color names.
selection
The child element which is addressed by the action. The default value is 1, which is the first child element.

Examples

<math>

<maction actiontype="toggle">

  <mfrac>
    <mn>6</mn>
    <mn>8</mn>
  </mfrac>
  
  <mfrac>
    <mrow>
      <mn>3</mn>
      <mo>&sdot;</mo>
      <mn>2</mn>
    </mrow>
    <mrow>
      <mn>4</mn>
      <mo>&sdot;</mo>
      <mn>2</mn>
    </mrow>    
  </mfrac>

  <mfrac>
    <mn>3</mn>
    <mn>4</mn>
  </mfrac>

</maction>

</math>

Browser compatibility

  • Desktop
  • Mobile

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support--1.0 (1.7 or earlier) ------
actiontype--toggle & statusline. tooltip is not implemented (bug 544001)------
href--7.0 (7.0) ------
mathbackground--4.0 (2.0) ------
mathcolor--4.0 (2.0) ------

Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support----1.0 (1.0) ------
actiontype--toggle & statusline. tooltip is not implemented (bug 544001)--------
href----7.0 (7.0) ------
mathbackground----4.0 (2.0) ------
mathcolor----4.0 (2.0) ------

Gecko-specific notes

  • Prior to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) the non-standard restyle value on the actiontype attribute was supported. This value has been removed.
  • Prior to Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0) the statusline action type was using a non-standard syntax (see below). This has been fixed to follow the MathML specification.
    <maction actiontype="statusline#(message)">
    (expression)
    </maction>
    

Tags (4)

Edit tags

Attachments (0)

 

Attach file