MathLive supports over 700 standard TeX and LaTeX commands and includes a few non-standard extensions which are documented here.
Decorations
\enclose, \cancel, \bcancel and \xcancel
These commands render some decorating marks called notations on top of their content. They can be used to highlight part of an expression, or to indicate an expression has been canceled with a strike mark.
Note
\encloseis an extension to LaTeX that follows the<menclose>definition of MathML and the LaTeX flavor defined by MathJax.Note The
\cancel,\bcanceland\xcancelcommands are part of the "cancel" LaTeX package.
\enclose
The \enclose command is the most flexible. It accepts three arguments, two
of which are required:
\enclose{notation:text}[style:text]{body:math}notationa list of whitespace delimited values. Acceptable values are:boxroundedboxcircletop,left,rightandbottomhorizontalstrike,verticalstrikeupdiagonalstrike,downdiagonalstrikeupdiagonalarrowphasorangleradicallongdivactuarialmadruwb
stylean optional list of comma separated attributes including:mathbackground="<color>"background color of the expressionmathcolor="<color>"color of the notation, for exampleredor#cd0030orrgba(205, 0, 11, .4).padding="<dimension>""auto"or an amount of padding around the contentshadow="<shadow>":"auto"or"none"or a CSSbox-shadowexpression for example,"0 0 2px rgba(0, 0, 0, 0.5)".- in addition the style property can include a stroke style expression that
follows the shorthand syntax of the CSS
borderproperty, for example"2px solid red".
bodya math expression that is "enclosed" by the specified notations
\cancel, \bcancel and \xcancel
| Command... | is a shorthand for... |
|---|---|
\cancel{body} |
\enclose{updiagonalstrike}{body} |
\bcancel{body} |
\enclose{downdiagonalstrike}{body} |
\xcancel{body} |
\enclose{updiagonalstrike downdiagonalstrike}{body} |
Examples
\enclose{updiagonalstrike downdiagonalstrike}[4px solid rgba(205, 0, 11, .4)]{42}
\xcancel{42}
\enclose{circle}[mathbackground="#fbc0bd"]{\frac1x}
\enclose{roundedbox}[1px dotted #cd0030]{\frac{x^2+y^2}{\sqrt{x^2+y^2}}}
