60

Possible Duplicate:
Draw a diagonal arrow across an expression in a formula to show that it vanishes

As you might know from my other questions, I am still a newbie at LaTeX, so please don't expect me to know anything.

How would I write crossed-out math in LaTeX, which is similar to this, but the line is oblique.

Is that possible?

97

The comments above should have solved the problem. But I thought a minimal example will go a long way:

\documentclass{article}
\usepackage{amsmath}
\usepackage[makeroom]{cancel}

\begin{document}
\noindent
\verb|\cancel{5y}|:
\[ x+\cancel{5y}=0\]
\verb|\bcancel{5y}|:
\[ x+\bcancel{5y}=0\]
\verb|\xcancel{5y}|:
\[ x+\xcancel{5y}=0\]
\verb|\cancelto{\infty}{5y}|:
\[ x+\cancelto{\infty}{5y}=0\]

The first three commands work in text mode also i.e., \cancel{5y}, \bcancel{5y} and 
\xcancel{5y} works but \verb|\cancelto{\infty}{5y}| is not. 
\end{document}

enter image description here

  • 1
    For some reason, in some cases \cancel and variants have to be inside curly brackets, for example this works: $x^{\cancel{5y}}$ while this fails $x^\cancel{5y}$. The error is Missing { inserted. ... \mathchoice`. – alfC Jul 1 '14 at 21:15
  • 3
    @alfC When you write super/subscript, it is always better to use braces. – user11232 Jul 1 '14 at 23:06

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