TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

How can I strike through an expression (e.g. "2x") obliquely, e.g. from bottom left to top right, so as to indicate cancellation? With the \sout command from the ulem package, I can only strike horizontally.

share|improve this question
near duplicate to [tex.stackexchange.com/questions/4465/… a slash through a word), although that doesn't have such nice example images. – barbara beeton Jan 6 '12 at 14:18
up vote 67 down vote accepted

The cancel package seems to do exactly what you want:




\( \cancel{2x} \)

\( \cancel{1234567890} \)


cancelled items

If you're not satisfied with how the cancellation starts below the 1 and ends above the 0, have a look at Diagonal strikeout starting too low and ending too high.

share|improve this answer
It does indeed. Many thanks! – Harry Macpherson Jan 6 '12 at 13:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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