6
$\begingroup$

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.

$\endgroup$

migrated from math.stackexchange.com Jan 29 '14 at 8:38

This question came from our site for people studying math at any level and professionals in related fields.

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

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

$\endgroup$
  • $\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$ – MPW Jan 29 '14 at 12:21
  • $\begingroup$ @MPW You're welcome! But I don't understand what you mean by your last question. $\endgroup$ – user93957 Jan 29 '14 at 12:37
  • $\begingroup$ The equivalent of LaTeX \usepackage? Or maybe LaTeX already has a \require command? I'm a little rusty... $\endgroup$ – MPW Jan 29 '14 at 12:55
  • $\begingroup$ I learn something new everyday on math SE. $\endgroup$ – Ave Maleficum Jan 29 '14 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$ – user93957 Jan 30 '14 at 12:33
  • $\begingroup$ @AveMaleficum We all learn something new everyday on Math.SE :-) $\endgroup$ – user93957 Jan 30 '14 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 Z Feb 2 '14 at 0:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .