[Tex/LaTex] MiKTeX, TeXnicCenter and “cancel” package – errors

cancelmiktextexniccenter

EDIT2:
I answered it below. I had duplicate of my cancel.sty where my .tex file was. That made some troubles (obviously).

EDIT:

\documentclass[a4paper,11pt]{article}
\usepackage[croatian]{babel}
\usepackage{cancel}
\begin{document}
\mbox{}\cancel{a}
\end{document}

I went to MiKTeX Package Manager, found "cancel" package, right click -> Install. Refreshed FNDB. Opened TeXnicCenter, wrote that code and tried to render it. I got 16 errors. Why (for me "normal" LaTeX, packages like amsmath are working and I'm able it to render it just fine, but now I need some additional functionality like this strikethrough in cancel package)?

MiKTeX 2.9
TeXnicCenter 1.0 RC1
- rendered via Sumatra PDF

enter image description here

Best Answer

Don't use \cancel on the very first word. It works for me, if I begin with a character or just \mbox:

\documentclass[a4paper,11pt]{article}
\usepackage[croatian]{babel}
\usepackage{cancel}
\begin{document}
\mbox{}\cancel{a}
\end{document}

If I use \cancel at the beginning of a paragraph, as in your example, I can confirm there's an error:

! You can't use `\/' in vertical mode.
\@cancel ...ht \unitlength \p@ \canc@thinlines {\/
                                                  \raise \dimen@ \hbox {\ooa...
l.7 \cancel{a}