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
\enclose
is an extension to LaTeX that follows the<menclose>
definition of MathML and the LaTeX flavor defined by MathJax.
Note The
\cancel
,\bcancel
and\xcancel
commands 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}
notation
a list of whitespace delimited values. Acceptable values are:box
roundedbox
circle
top
,left
,right
andbottom
horizontalstrike
,verticalstrike
updiagonalstrike
,downdiagonalstrike
updiagonalarrow
phasorangle
radical
longdiv
actuarial
madruwb
style
an optional list of comma separated attributes including:mathbackground="<color>"
background color of the expressionmathcolor="<color>"
color of the notation, for examplered
or#cd0030
orrgba(205, 0, 11, .4)
.padding="<dimension>"
"auto"
or an amount of padding around the contentshadow="<shadow>"
:"auto"
or"none"
or a CSSbox-shadow
expression 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
border
property, for example"2px solid red"
.
body
a 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}}}