What is the MathJax syntax to produce a big slash through a formula? I've seen it used but can't find an example now.
-
2$\begingroup$ It is probably better to ask this in Meta. It isn't about math after all. $\endgroup$– Jyrki LahtonenCommented Jan 29, 2014 at 8:24
-
1$\begingroup$ Or tex.stackexchange.com $\endgroup$– G. H. FaustCommented Jan 29, 2014 at 8:24
-
$\begingroup$ $\require{cancel} \cancel{\sum \! \! \! \! \! \! \large \int}$... $\endgroup$– draks ...Commented Jan 29, 2014 at 11:41
-
2$\begingroup$ @draks... Here is a better version: $$\require{cancel}\cancel{\color{#01020b}{\rlap{\displaystyle\,\int}{\sum}}}$$ $\endgroup$– user93957Commented Jan 29, 2014 at 12:38
-
$\begingroup$ @Aðøbe touché... $\endgroup$– draks ...Commented Jan 29, 2014 at 12:40
-
3$\begingroup$ Haha, very good, clever both of you ;) $\endgroup$– MPWCommented Jan 29, 2014 at 12:53
1 Answer
It's probably the \cancel
command.
\require{cancel}
\dfrac{\cancel{9}}{2t}\cdot\dfrac{t}{\cancel{9}}
will produce: $$\require{cancel} \dfrac{\cancel{9}}{2t}\cdot\dfrac{t}{\cancel{9}}$$ For a slightly better appearance you can use the following code:
\require{cancel}
\dfrac{\color{red}{\cancel{\color{black}{9}}}}{2t}
\cdot
\dfrac{t}{\color{red}{\cancel{\color{black}{9}}}}
which produces: $$ \require{cancel} \dfrac{\color{red}{\cancel{\color{black}{9}}}}{2t} \cdot \dfrac{t}{\color{red}{\cancel{\color{black}{9}}}}$$
There is also the \cancelto
command:
\require{cancel}
\cancelto{\dfrac{\sqrt{x^2+x+2}}{\sqrt{\beta+\alpha}}}{1}
$$ \require{cancel} \cancelto{1}{\dfrac{\sqrt{x^2+x+2}}{\sqrt{\beta+\alpha}}}$$
-
$\begingroup$ I tried \cancel but the parser didn't know it. Now I see from your example that I needed \require{cancel} first! didn't know about that. Thanks! FOLLOWUP: Is this just how you use packages? $\endgroup$– MPWCommented Jan 29, 2014 at 12:21
-
$\begingroup$ @MPW You're welcome! But I don't understand what you mean by your last question. $\endgroup$– user93957Commented Jan 29, 2014 at 12:37
-
$\begingroup$ The equivalent of LaTeX \usepackage? Or maybe LaTeX already has a \require command? I'm a little rusty... $\endgroup$– MPWCommented Jan 29, 2014 at 12:55
-
$\begingroup$ I learn something new everyday on math SE. $\endgroup$ Commented Jan 29, 2014 at 14:41
-
$\begingroup$ @MPW As far as I know (my LaTeX knowledge is very poor) the
\usepackage
and\require
are equivalent. (I'm maybe wrong). $\endgroup$– user93957Commented Jan 30, 2014 at 12:33 -
$\begingroup$ @AveMaleficum We all learn something new everyday on Math.SE :-) $\endgroup$– user93957Commented Jan 30, 2014 at 12:34
-
1$\begingroup$ I believe
\require
is a MathJax command. It fills roughly the same role that\usepackage
does in LaTeX. $\endgroup$– David ZCommented Feb 2, 2014 at 0:50