How to Use Strikethrough in LaTeX
Description1
You can apply strikethrough using either the \sout
from the ulem
package or the st
from the soul
package.
Code
\sout
It works well with equations, but it doesn’t seem to work properly in display mode.
\documentclass[10pt]{article}
\usepackage{amsmath, amssymb}
\usepackage{ulem}
\begin{document}
\sout{The ulem package provides various types of underlining}
that can stretch between words and be broken across lines.
Use it with {\LaTeX} or plain \TeX. \\
\sout{$x^{2} + y^{2} = 1$}
$$
\sout{ \hat{f}(\xi) = \int_{\mathbb{R}} f(x) e^{-2\pi i x \xi} dx }
$$
\end{document}
\st
In the case of \st
, using it in display mode results in an error, preventing the document from rendering correctly.
\documentclass[10pt]{article}
\usepackage{amsmath, amssymb}
\usepackage{soul}
\begin{document}
\st{The soul-ori package provides five commands that are aimed at emphasizing text parts}.
Each of the commands takes one argument that can either be the text
itself or the name of a macro that contains text.\\
\st{$x = \dfrac{-b \pm \sqrt{b^{2} - 4ac}}{2a}$}
\end{document}