How can I cross out a mathematical expression with a horizontal line? Thanks.


closed as off topic by user4594, Davide Giraudo, Potato, user1729, rschwieb Mar 26 '13 at 17:23

Questions on Mathematics Meta Stack Exchange are expected to relate to Mathematics Stack Exchange or the software that powers the Stack Exchange network within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ See also: Striking out equations $\endgroup$ – Martin Mar 21 '13 at 17:46
  • 2
    $\begingroup$ I am slightly confused as to why this was closed as "off topic", and I am listed as one of the closers. I voted to close it because it is a duplicate! (And if this is off topic then so is the original, so I think we are having double-standards...) $\endgroup$ – user1729 Mar 27 '13 at 9:40

In text environment you can use <strike> </strike>, for example: strike.

In math environment, you can cross out expressions using cancel bcancel xcancel or cancelto as long as you require them first.

$\require{cancel} \cancel{2-2}$ $\require{cancel} \cancel{2-2}$

$\require{bcancel} \bcancel{2-2}$ $\require{bcancel} \bcancel{2-2}$

$\require{xcancel} \xcancel{2-2}$ $\require{xcancel} \xcancel{2-2}$

$\require{cancelto} \cancelto{0}{2-2}$ $\require{cancelto} \cancelto{0}{2-2}$

As far as I know there is no perfect execution of horizontal strike-through in math environment. You can try to do it using css, with \style{text-decoration:line-through}{...}. This works fine sometimes $$\style{text-decoration:line-through}{abcd\sum\prod\bigotimes}$$ but it messes up with subscripts and superscripts and fractions $$\style{text-decoration:line-through}{\sum_{i=0}^n\left(x_iy^i\frac{z}{u}\right)}$$ I hope someone knows of a more reliable way to do horizontal strike-through in math environment, but I think this may be it.

  • 5
    $\begingroup$ In a similar question Davide Cervone suggests using $\require{enclose} \enclose{horizontalstrike}{(a+b)^2 = a^2 + 2ab + b^2}$ which produces horizontal strike-throughs. $\endgroup$ – Martin Mar 21 '13 at 17:45
  • $\begingroup$ Great! Thanks @Martin. $\endgroup$ – Alexander Gruber Mar 21 '13 at 17:49
  • $\begingroup$ See the MathJax doc on enclose. (= MathML <menclose>) $\endgroup$ – Math Gems Mar 21 '13 at 18:10
  • $\begingroup$ Thanks for sharing us the codes Alexander. :) $\endgroup$ – mrs Jul 22 '13 at 17:17

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