HTML5 MathML
HTML5 MathML accent Attribute
The accent attribute on <mover> and <munder> controls whether the script is drawn as a tight accent, pulled close to the base, or as a separate limit. It is what turns a bar or arrow into a hat rather than a distant label.
Definition and Usage
When accent is true, the over- or under-script is treated as an accent and drawn snugly against the base - like the hat in x-hat or the arrow in a vector. When false, it is spaced away as a limit, as for the condition under a summation.
Syntax
<mover accent="true">
<mi>x</mi>
<mo>^</mo>
</mover>Example
This contrasts an accent (hat, close to the base) with a non-accent overscript.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MathML accent attribute</title>
</head>
<body>
<math display="block">
<mrow>
<mover accent="true">
<mi>x</mi>
<mo>^</mo>
</mover>
<mo>+</mo>
<mover accent="false">
<mi>y</mi>
<mo>→</mo>
</mover>
</mrow>
</math>
</body>
</html>accent is part of MathML Core and works on <mover> and <munder>. Use accent="true" for hats, bars, tildes and vector arrows.
Key Takeaways
- accent decides whether a script is a tight accent or a spaced limit.
- true is for hats, bars and arrows; false is for limits.
- It applies to <mover> and <munder>.
