# How can I slash through a formula?

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.

• It is probably better to ask this in Meta. It isn't about math after all. – Jyrki Lahtonen Jan 29 '14 at 8:24
• – G. H. Faust Jan 29 '14 at 8:24
• $\require{cancel} \cancel{\sum \! \! \! \! \! \! \large \int}$... – draks ... Jan 29 '14 at 11:41
• @draks... Here is a better version: $$\require{cancel}\cancel{\color{#01020b}{\rlap{\displaystyle\,\int}{\sum}}}$$ – user93957 Jan 29 '14 at 12:38
• @Aðøbe touché... – draks ... Jan 29 '14 at 12:40
• Haha, very good, clever both of you ;) – MPW Jan 29 '14 at 12:53

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}}}$$

• 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? – MPW Jan 29 '14 at 12:21
• @MPW You're welcome! But I don't understand what you mean by your last question. – user93957 Jan 29 '14 at 12:37
• The equivalent of LaTeX \usepackage? Or maybe LaTeX already has a \require command? I'm a little rusty... – MPW Jan 29 '14 at 12:55
• I learn something new everyday on math SE. – Ave Maleficum Jan 29 '14 at 14:41
• @MPW As far as I know (my LaTeX knowledge is very poor) the \usepackage and \require are equivalent. (I'm maybe wrong). – user93957 Jan 30 '14 at 12:33
• @AveMaleficum We all learn something new everyday on Math.SE :-) – user93957 Jan 30 '14 at 12:34
• I believe \require is a MathJax command. It fills roughly the same role that \usepackage does in LaTeX. – David Z Feb 2 '14 at 0:50