# Cancel (cross out) normal text in non-math mode

I want to cross out a letter. I found Draw a diagonal arrow across an expression in a formula to show that it vanishes but this works in mathmode only and mathmode changes the font. Is there a way to do the same without going to math mode? I need this for a slide where I want to have a really big font and wnat to remove' the first letter of a word.

\documentclass{article}

\usepackage{cancel}

\begin{document}

$\xcancel{T}$

\end{document}

-
Donald Arseneau said in the documentation that "Drawing slashes through math to indicate “cancellation” is poor design." So what is the rich design? :-) –  Who is crazy first Jul 18 at 7:56

Why should one worry when there is tikz? ;)

\documentclass{article}
\usepackage{tikz}
\newcommand{\tcancel}[2][thick]{%
\begin{tikzpicture}
\node[inner sep=1pt] (a){#2};
\draw[#1] (a.south west) -- (a.north east);
\draw[#1] (a.north west) -- (a.south east);
\end{tikzpicture}%
}
\begin{document}
\tcancel{T}

\tcancel[red,line width=1pt]{T}
\end{document}


Thanks to Claudio Fiandrinos idea that this can be improved further

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
\newcommand{\tcancel}[2][black]{%
\begin{tikzpicture}
\node[draw=#1,cross out,inner sep=1pt] (a){#2};
\end{tikzpicture}%
}
\begin{document}
\tcancel{T}

\tcancel[red,thick]{T}
\end{document}


The baseline may be corrected by [baseline={(a.base)}]as in

\newcommand{\tcancel}[2][black]{%
\begin{tikzpicture}[baseline={(a.base)}]
\node[draw=#1,cross out,inner sep=0pt,outer sep=0pt] (a){#2};
\end{tikzpicture}%
}


Adjust inner and outer seps as you wish.

-
You can even improve it just using one node and the shape cross out (it requires shapes.misc library). –  Claudio Fiandrino Jul 18 at 6:57
@ClaudioFiandrino Thanks for the idea. I have updated the answer. –  Harish Kumar Jul 18 at 7:52
@Mico To use it with other text, some polishing is needed. I have updated the answer. –  Harish Kumar Jul 18 at 9:53

You could achieve your objective by creating a macro named, say, \tcancel (short for text-mode cancel...) as a text-mode wrapper around \xcancel.

\documentclass{article}
\usepackage{cancel}
\usepackage{amsmath} % for \ensuremath and \text macros
\newcommand{\tcancel}[1]{\ensuremath{\xcancel{\text{#1}}}}
\begin{document}
$\xcancel{T}$ (letter is in math mode)

\tcancel{T} (letter is in text mode)
\end{document}

-

\mbox{} can be used to switch back to text mode from math:

\documentclass{article}

\usepackage{cancel}

\begin{document}

$\xcancel{\mbox{T}}$

\end{document}


-