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

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

In a course book I'm currently reading, the author uses notation typeset in LaTeX (or some other TeX flavour...) that I usually use when writing by hand, but never thought was possible with TeX: he "crosses out" terms in an equation with an arrow and the number 0, indicating that they go to zero and will be ignored.

For example, this notation is used when linearizing equation, to show which higher order terms are ignored in the coming analysis. It basically looks like a long, slanted arrow (a / with an arrowhead) that reaches from a little below the line to a little above the line, with the arrowhead upwards and a small 0 at the tip. I realize this description is pretty vague, but it's probably the best I can do without paint :P

How do I accomplish this in LaTeX?

(I usually use pdflatex or xelatex to compile, so it should preferrably be compatible with either of those flavours...)

share|improve this question

marked as duplicate by Matthew Leingang, Loop Space, lockstep, topskip, Torbjørn T. Oct 12 '11 at 18:00

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.

Feel free to use paint! – Loop Space Oct 12 '11 at 12:30
up vote 25 down vote accepted

Take a look at the cancel package, which provides \cancelto{<value>}{expression}. Minimal example:


enter image description here

share|improve this answer
Fantastic - exactly what I'm looking for! – Tomas Lycken Oct 12 '11 at 12:41

Invoke the package \usepackage{cancel} then use the following command \cancelto{0}{x} in math mode where x is being cancelled to the number zero. A \cancel{x} cross the term out without any number.

share|improve this answer
If I could accept two answers, I would =) – Tomas Lycken Oct 12 '11 at 12:41

Presumably, this is for a talk, in which case you (or someone else) might be interested in a beamer-ized version of \cancelto:


\renewcommand{\CancelColor}{\color{red}} %change cancel color to red

\let\my@cancelto\cancelto %copy over the original cancelto command
% redefine the cancelto command, using \phantom to assure that the
% result doesn't wiggle up and down with and without the arrow


} %use the new cancelto command


which results in

enter image description here

(the scalebox stuff is just so the resulting figure is small, but the important parts still legible...)

The other commands can be similarly beamer-ized, but this is left as an exercise for the user...

share|improve this answer
Not what I was looking for this time, but definitely nice for future reference! – Tomas Lycken Oct 12 '11 at 20:05

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