I want to use \cancel command in TeXnicCenter but it is giving error while using that..

Basically I want to show cancellation of 2 with 2, using \frac.

Like: \frac{2}{2} but I want to show it like: \(\frac{\cancel{2}}{\cancel{2}}\).

And I am unable to do it, can anybody please tell me how to do it..

  • 9
    Did you load the cancel package?
    – Joseph Wright
    Apr 9 '13 at 7:23
  • 6
    @Gurpreet As with every package: \usepackage{cancel} Apr 9 '13 at 20:31
  • 3
    to new users it is not obvious that \cancel comes from the cancel package. i found this question (and the answer) very helpful and am surprised it was closed as "too localized." please re-open.
    – dbliss
    Sep 15 '17 at 15:08
  • 1
    @dbliss Why reopen? Reopening is for allowing more answers. There is an answer with the cancel package and with screenshot and explanation. No need to encourage writing further answers (again about making \cancel work with cancel package). Simply no need to open as no solution is prevented as the meaningful one has been given. Closed does not mean bad but answering closed.
    – Stefan Kottwitz
    Sep 17 '17 at 3:40
  • 1
    @StefanKottwitz in terms of practical effect, i don't have too much of a case to make. all i'd say is that new users might see this question and infer that questions like this are discouraged by the site, which seems to me wrong. and then technically, if the goal is just to prevent more answers, should the question be "protected" rather than "closed"? in the end, i don't care enough to have a meta debate about this minor issue.
    – dbliss
    Sep 17 '17 at 11:12

enter image description here

  • 2
    \abovedisplayskip=0pt and \documentclass[preview,border=12pt,varwidth]{standalone} are used above just for my own purpose, you do NOT need them. One more \bcancel can be used not only for b but also for other charactes such as \bcancel{x} and \bcancel{y}. Apr 9 '13 at 7:35
  • @Joseph, I am done with this, I have installed Miktex and yes this package is loaded and successfully I have got the solution of my query..
    – Gurpreet
    Apr 9 '13 at 19:35

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.