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
Luckily, it's very easy to cross something out in a LaTeX expression. Simply use the \cancel{x} command, where x is whatever you want to cross out.
Insert a double backslash to set a point for the equation to be broken. The first part will be aligned to the left and the second part will be displayed in the next line and aligned to the right.
In the LaTeX block, you can insert an inline formula by typing the equation inside $.. $ . For example, type: An inline equation is $e=mc^2$.
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}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With