Strikethrough text in LaTeX (sout, st)
LaTeX has no strikethrough command of its own. Load ulem and write \sout{text}, or load soul and write \st{text}. Both draw a line through text that still breaks at the end of a line.
Preamble
The snippets on this page need these lines before \begin{document}:
\usepackage[normalem]{ulem}Strike through with ulem
\sout{...} draws a horizontal line through its argument. The option normalem keeps \emph italic; without it ulem changes \emph to underlining in the whole document.
The meeting is on \sout{Monday} Tuesday.Cross out with slashes
\xout{...} from ulem covers the text with diagonal strokes.
\xout{This sentence is crossed out.}Strike through with soul
The soul package has \st{...}. With xcolor loaded, \setstcolor{red} colours the line and leaves the text black.
Complete document:
\documentclass{article}
\usepackage{xcolor}
\usepackage{soul}
\begin{document}
The price is \st{20 euros} 15 euros.
\setstcolor{red}
The price is \st{20 euros} 15 euros.
\end{document}Pitfalls
\stfromsoulfails on commands such as\refand\citein its argument. Wrap them in\mbox{...}.- To strike through a term in a formula use the
cancelpackage, see Cancel terms in an equation in LaTeX.
Compiled with pdfLaTeX from TeX Live 2023.
Related pages
- Package
ulem - Package
soul - How-to Cancel terms in an equation in LaTeX
- How-to Highlight text in LaTeX
- How-to Bold, italic and underlined text in LaTeX
- Package
xcolor