Since \sout does not work in math mode, what can I use instead? I don't want the diagonal strikeout like with cancelf


The package cancel was made exactly for this purpose.

The manual says that there are four different commands:

  1. \cancel
  2. \bcancel
  3. \xcancel
  4. \cancelto{<value>}{<expression>}

The first three work in math and text mode, but \cancelto is only for math mode.

And this is what they do

enter image description here





\(\cancel{f(x)} = \bcancel{4} + \xcancel{5} - \cancelto{45}{60}\)

| improve this answer | |

This answer is heavily based on egreg's comment and he deserves all the credit.


    \dimen@=\dimexpr\ht\tw@-\ht\z@+2\p@\relax % The +2 represents the vertical shift of the line.
    \hrule\@height0.5\p@ % The 0.5 represent the thickness on the line.

    \mathstrike{f(x) = x^2},\qquad \mathstrike{c_0}, \qquad \mathstrike{f(x) = x^2 + c_0}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.