latextypesettingstrikethroughmathematical-typesetting

How to strike out inside LaTeX equations?


Please see the snippet below and tell me how can I achieve the same strike-out effect as in the main text. I am using the version of LaTeX from the latest Ubuntu repositories.

\documentclass{article}
\usepackage{ulem}
\begin{document}
The sout tag works perfect in the \sout{main text area} but not inside the equations.
$$
list = [1, \sout{2}, 3, \sout{4}, 5, \sout{6}, 7, \sout{8}, 9, \sout{10}]
$$
Any clue?
\end{document}

Here is LaTeX output


Solution

  • It looks like the \sout doesn't work inside a math env. You can try doing something like this, which works:

    \documentclass{article}
    \usepackage{ulem}
    \begin{document}
    The sout tag works perfect in the \sout{main text area} but not inside the equations.
    
    $list = $[1, \sout{2}, 3, \sout{4}, 5, \sout{6}, 7, \sout{8}, 9, \sout{10}$]$
    
    Any clue?
    \end{document}