TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

marked as duplicate by Mico, Gonzalo Medina, Harish Kumar, lockstep, Werner Oct 6 '12 at 14:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Have a look at the cancel package. – Mico Oct 6 '12 at 11:12
@Mico Could you provide further details? – think123 Oct 6 '12 at 11:45
up vote 42 down vote accepted

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


\[ x+\cancel{5y}=0\]
\[ x+\bcancel{5y}=0\]
\[ x+\xcancel{5y}=0\]
\[ 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. 

enter image description here

share|improve this answer
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
@alfC When you write super/subscript, it is always better to use braces. – Harish Kumar Jul 1 '14 at 23:06

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