# How to write crossed-out math in LaTeX?

Source: https://tex.stackexchange.com/questions/75525/how-to-write-crossed-out-math-in-latex

 The comments above should have solved the problem. But I thought a minimal example will go a long way: \documentclass{article} \usepackage{amsmath} \usepackage[makeroom]{cancel} \begin{document} \noindent \verb|\cancel{5y}|: $x+\cancel{5y}=0$ \verb|\bcancel{5y}|: $x+\bcancel{5y}=0$ \verb|\xcancel{5y}|: $x+\xcancel{5y}=0$ \verb|\cancelto{\infty}{5y}|: $x+\cancelto{\infty}{5y}=0$ The first three commands work in text mode also i.e., \cancel{5y}, \bcancel{5y} and \xcancel{5y} works but \verb|\cancelto{\infty}{5y}| is not. \end{document}