# Striking out equations

I wanted to strike out a part of an answer which I wrote earlier here. I tried using <s> </s>. This helps in striking out the text but the last two equations are not struck out. For example,

<s> Striking out text </s> produces " Striking out text "

However, it fails to strike out in the math mode. For instance,

<s>Square of sum of two numbers is given by $(a+b)^2 = a^2 + 2ab + b^2$. Here is some text following the math mode.</s>

produces

Square of sum of two numbers is given by $(a+b)^2 = a^2 + 2ab + b^2$. Here is some text following the math mode.

How to strike out equations and other written stuff in math mode?

This occurs for both chrome (Version 19.0.1084.56) and firefox (Version 13.0 Mozilla Firefox for Ubuntu canonical - 1.0) on Ubuntu 12.04.

This also occurs for both chrome (Version 19.0.1084.56) and Safari (Version 5.1.7 (7534.57.2)) on Mac OSX 10.7.4.

Below is a picture of this question to indicate where it fails to strike the equation.

• – Asaf Karagila Jun 19 '12 at 22:53
• What you did in this question works fine for me (Firefox 3.6.15 on Windows 7). Or did you want the superscripts to be stricken out individually? – hmakholm left over Monica Jun 20 '12 at 0:41
• @HenningMakholm Is the equation i.e. $(a+b)^2 = a^2 + 2ab + b^2$ struck off as well? If so, can you take a screenshort and post it as an answer? It is interesting that this works fine on windows. – user17762 Jun 20 '12 at 0:45
• Chrome 20.0.1132.27 beta on OSX 10.6.8 produces the same result as your screenshot. – Isaac Jun 20 '12 at 1:50
• as a work around, since you are striking it out, perhaps you can just remove the dollar signs? – Willie Wong Jun 20 '12 at 7:43
• I've noticed something similar with tags, see here. But I don't consider it to be a real problem. – Martin Sleziak Jun 20 '12 at 12:16
• I will add that the MathJax tutorial on this meta has a separate entry called Crossing out things. – Martin Sleziak Mar 20 '19 at 3:16

This is not a perfect solution, but it should act reasonably well as a work-around:

<s>Square of sum of two numbers is given by
</s>$\require{enclose} \enclose{horizontalstrike}{(a+b)^2 = a^2 + 2ab + b^2}$<s>.
Here is some text following the math mode.</s>


Square of sum of two numbers is given by $\require{enclose}\enclose{horizontalstrike}{(a+b)^2 = a^2 + 2ab + b^2}$. Here is some text following the math mode.

The \require{enclose} need only be done the first time (but it is not an error to include it multiple times).

At https://math.meta.stackexchange.com/a/8847/53259, Alexander Gruber helpfully offers some alternatives. For some reason, they work for me here at MSE Meta but NOT on MSE. On MSE, I've discovered that the following work, where I just use "\require{cancel}" instead of \require{...cancel}

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

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

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

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

It seems to work exactly as it should for me. Here's a screenshot:

Firefox 3.6.15 on Windows 7.

• Thanks. I never thought it would be an issue with the OS/browser. I have added my screenshot in the question. – user17762 Jun 20 '12 at 0:52
• On the other hand, Chrome 19.0.1084.56 m (also Windows 7) does fail to strike the equation, with results comparable to the Ubunto screenshot in the question. – hmakholm left over Monica Jun 20 '12 at 0:52
• @Marvis: Rendering problems on the web are "almost always" (or at least more often than not) browser-specific. Sometimes also OS specific, primarily when the availability of system fonts plays a role. – hmakholm left over Monica Jun 20 '12 at 0:55
• And Firefox 13.0.1 on Windows also fails to strike out the equation. – Arturo Magidin Jun 20 '12 at 4:23
• This has never worked for me. I have gone through several upgrades of Firefox (currently at ver 12.0), and given up hope. Running on Win XP. – Jyrki Lahtonen Jun 20 '12 at 6:52
• Firefox versions (roughly) 10 through 13 (on various OS) all fail to strike out the equation. I think it has more to do with the browser than with the OS. – Willie Wong Jun 20 '12 at 7:42