# How to cross out mathematical expressions? [closed]

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

## closed as off topic by user4594, Davide Giraudo, Potato, user1729, rschwiebMar 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.

• See also: Striking out equations – Martin Mar 21 '13 at 17:46
• 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...) – 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.

• 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. – Martin Mar 21 '13 at 17:45
• Great! Thanks @Martin. – Alexander Gruber Mar 21 '13 at 17:49
• See the MathJax doc on enclose. (= MathML <menclose>) – Math Gems Mar 21 '13 at 18:10
• Thanks for sharing us the codes Alexander. :) – mrs Jul 22 '13 at 17:17