I want to use cancel to but with just a line instead of an arrowenter image description here

2 Answers 2


Welcome to Tex.SE !

One of many solutions:


\tikzset{main node/.style={inner sep=0,outer sep=0},
label node/.style={inner sep=0,outer ysep=.2em,outer xsep=.4em,font=\scriptsize,overlay},
strike out/.style={shorten <=-.2em,shorten >=-.5em,overlay}}

  \node[main node](N){$#2$};
  \node[label node,#1, anchor=south west] at (N.north east){$#3$};
  \draw[-,#1]  (N.south west) -- (N.north east)}}

    and math

enter image description here


If you just want to remove the arrow tip, you can patch \canto@vector to use \line instead of \vector.

\usepackage{xpatch}% to patch \cancel






enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .