Strikethrough and Cross Out in LaTeX: \sout, \cancel and \st
LaTeX has no built-in strikethrough command. The standard answer is \sout from the ulem package for text, and \cancel from the cancel package for math. This guide covers both, the soul alternative \st, colored strikes, crossing out in tables and Beamer, negated relations with \not, redlining with the changes package, why Unicode strikethrough is a bad idea, and the errors you will meet.
Strikethrough Text with ulem: \sout
Load ulem with the normalem option and use \sout. The option matters: without it, ulem redefines \emph and \em to underline instead of italicise, which silently changes every emphasised word in your document.
\usepackage[normalem]{ulem}
\sout{struck through} % horizontal line through the text
\xout{crossed out} % hatched with slashes ///
\uline{underlined}
\uuline{double underlined}
\uwave{wavy underline}
\dashuline{dashed underline}
\dotuline{dotted underline}ulem's commands allow line breaks inside the argument, so a struck-out passage can run over several lines. The thickness of the line is held in the macro \ULthickness and its vertical position in the dimension \ULdepth; both can be changed, for example \renewcommand{\ULthickness}{1pt} for a heavier strike.
Two limitations: the argument is treated word by word, so a command that takes arguments inside \sout occasionally needs an extra pair of braces (\sout{{\textbf{bold}} text}), and the text cannot contain a paragraph break.
The soul Alternative: \st
The soul package provides \st for strikeout, along with \ul (underline), \hl (highlight) and \so (letter spacing). It processes the text syllable by syllable, so hyphenation and line breaking are handled well, and it has a clean way to color the line:
\usepackage{xcolor}
\usepackage{soul}
\st{struck through}
\setstcolor{red} % red line, text keeps its color
\st{struck through in red}The price of soul's syllable scanning is that it must understand everything in the argument. Commands with arguments must be registered first (\soulregister{\cite}{1}); an unregistered one such as \st{see \cite{foo}} fails with an “extra }” error. Inline math is kept as one unbreakable unit, and unusual font encodings can produce “Package soul Error: Reconstruction failed”. With pdfLaTeX and non-ASCII characters (umlauts, accented letters), use current soul (version 3, TeX Live 2023 or later), which includes the UTF-8 support that used to be a separate soulutf8 package. For short phrases of plain text, \st is excellent; for anything with markup inside, \sout is more forgiving.
Crossing Out in Math: the cancel Package
For equations, the cancel package draws diagonal strokes that scale with the expression, which is what a reader expects when terms cancel out:
\usepackage{cancel}
\[
\frac{\cancel{x}\,(x+1)}{\cancel{x}} = x + 1 % diagonal /
\]
\[
\bcancel{y} \qquad \xcancel{z} % backslash \, cross X
\]
\[
\lim_{n \to \infty} \Bigl( 2 + \cancelto{0}{\frac{1}{n}} \Bigr) = 2 % arrow to a value
\]\cancel{...}– diagonal stroke from bottom left to top right\bcancel{...}– stroke from top left to bottom right\xcancel{...}– both strokes, an X\cancelto{value}{...}– arrow pointing at the value the term becomes; math mode only
The first three also work in text mode. The thicklines package option gives heavier strokes, and makeroom adds horizontal space so the strokes do not collide with neighbours. The color of the strokes is set with \CancelColor:
\usepackage{xcolor}
\usepackage[thicklines]{cancel}
\renewcommand{\CancelColor}{\color{red}}
\[ a + \cancel{b} - \cancel{b} = a \]Negating a relation: \not
Crossing out a relation symbol is a different job. \not overlays a slash on the next symbol, but the dedicated negated symbols are spaced better and should be preferred where they exist:
$a \not= b$ % works, but \neq is better
$a \neq b$
$x \notin A$ % rather than \not\in
$A \not\subset B$ % no dedicated symbol in the kernel; \nsubseteq is in amssymb
$a \not\equiv b$ % \nequiv does not exist; \not\equiv is fineStrikethrough in Tables and Beamer
\sout works inside table cells with no special treatment. In Beamer, crossing something out on the next slide is a matter of overlays; use \alt or \only so the struck version replaces the original:
\documentclass{beamer}
\usepackage[normalem]{ulem}
\begin{frame}{Plan}
\begin{itemize}
\item \alt<2->{\sout{Ship on Friday}}{Ship on Friday}
\item<2-> Ship on Monday
\end{itemize}
\begin{tabular}{lr}
Old price & \sout{\$40} \\
New price & \alert{\$25}
\end{tabular}
\end{frame}Note that the normalem option is essential in Beamer, which relies on \emph for its own highlighting. For simply drawing attention to a change, \alert is often clearer than a strike.
Colored Strikethrough
With ulem, the line takes the color in force where \sout is called, and the text inside can be switched back:
\usepackage{xcolor}
\usepackage[normalem]{ulem}
\textcolor{red}{\sout{text and line both red}}
{\color{red}\sout{\textcolor{black}{black text, red line}}}
% as a reusable command
\newcommand{\redsout}[1]{{\color{red}\sout{\textcolor{black}{#1}}}}soul's \setstcolor{red} does the same with less nesting, and cancel uses \CancelColor as shown above.
Track Changes: the changes Package
If the strikethrough is meant to show an editor what was deleted, use a package designed for redlining. changes marks additions, deletions and replacements by author, with a list of changes and a single switch to accept them all:
\usepackage[draft]{changes}
\definechangesauthor[name={Ada Lovelace}, color=blue]{AL}
The result was \deleted[id=AL]{inconclusive}\added[id=AL]{significant}.
We used \replaced[id=AL]{five}{three} runs.
\highlight[id=AL]{This sentence needs a citation.}\comment[id=AL]{Which paper?}
\listofchanges % summary of all changesSwitching the option to final (\usepackage[final]{changes}) accepts every change: deleted text disappears, added text is printed normally, and the markup can stay in the source. For annotations that live in the PDF's comment layer rather than in the typeset text, pdfcomment offers \pdfmarkupcomment[markup=StrikeOut]{text}{note}, which readers can show or hide in their viewer.
Why Not Unicode Strikethrough
Online “strikethrough text generators” insert the combining character U+0336 after every letter (s̶t̶r̶i̶k̶e̶). In LaTeX this is the wrong tool: pdfLaTeX stops with “Unicode character ̶ (U+0336) not set up for use with LaTeX”, and under XeLaTeX or LuaLaTeX the result depends on whether the font has the combining glyph; most text fonts draw it badly or not at all. It also breaks searching and copying from the PDF. Use \sout and let LaTeX draw the line.
Common Errors and Fixes
| Symptom or message | Cause | Fix |
|---|---|---|
Every \emph is underlined instead of italic | ulem loaded without normalem | \usepackage[normalem]{ulem} |
\sout in an equation: the line lands under the expression, not through it | ulem sets the rule as a fixed-depth limit below a \mathop | Use \cancel, \bcancel or \xcancel from cancel |
| Package soul Error: Reconstruction failed | A font change or encoding inside \st that soul cannot scan (an unregistered command with arguments fails with an “extra }” error instead) | Register the command with \soulregister, keep markup outside \st, or use \sout |
| Undefined control sequence \sout / \st / \cancel | Package not loaded | Add \usepackage for ulem, soul or cancel |
\cancelto gives Missing $ inserted | Used in text mode | \cancelto is math only; wrap it in $...$ |
| Strike line is invisible or too thin in a printout | Default 0.4pt rule at small font sizes | \renewcommand{\ULthickness}{0.8pt} or the thicklines option of cancel |
| Beamer overlays show both the plain and the struck text | Two \only blocks with overlapping specifications | Use \alt<2->{\sout{text}}{text} |
| Unicode character ̶ (U+0336) not set up for use with LaTeX | Pasted Unicode strikethrough text | Remove the combining characters and use \sout |
Complete Example
\documentclass{article}
\usepackage{amsmath, amssymb}
\usepackage{xcolor}
\usepackage[normalem]{ulem}
\usepackage{soul}
\usepackage{cancel}
\usepackage[draft]{changes}
\renewcommand{\CancelColor}{\color{red}}
\setstcolor{red}
\definechangesauthor[name={Ada Lovelace}, color=blue]{AL}
\begin{document}
\section{Text}
The deadline is \sout{Friday} Monday. The budget was
\xout{generous} \uwave{adequate}, and the plan is \st{on track}.
\begin{center}
\begin{tabular}{lr}
Old price & \sout{\$40} \\
New price & \$25
\end{tabular}
\end{center}
\section{Math}
\[
\frac{\cancel{(x+1)}(x-1)}{\cancel{(x+1)}} = x - 1,
\qquad
\lim_{n \to \infty} \left( 2 + \cancelto{0}{\frac{1}{n}} \right) = 2,
\qquad
3 \notin \{1, 2\}, \quad A \nsubseteq B.
\]
\section{Revision}
The result was \deleted[id=AL]{inconclusive}\added[id=AL]{significant},
based on \replaced[id=AL]{five}{three} runs.
\end{document}Quick Reference
| Task | Command |
|---|---|
| Strikethrough text | \sout{text} with \usepackage[normalem]{ulem} |
| Cross out with slashes | \xout{text} |
| Wavy / dashed / dotted underline | \uwave{} / \dashuline{} / \dotuline{} |
| Strikethrough with soul | \st{text} |
| Colored strike, black text | \setstcolor{red} (soul) or {\color{red}\sout{\textcolor{black}{text}}} |
| Thicker line (ulem) | \renewcommand{\ULthickness}{1pt} |
| Cancel a term in math | \cancel{x}, \bcancel{x}, \xcancel{x} |
| Cancel to a value | \cancelto{0}{x} (math only) |
| Red cancel strokes | \renewcommand{\CancelColor}{\color{red}} |
| Negate a relation | \neq, \notin, \nsubseteq, or \not before the symbol |
| Strike on the next Beamer slide | \alt<2->{\sout{text}}{text} |
| Track changes | \deleted{}, \added{}, \replaced{new}{old} (changes) |
| Accept all changes | \usepackage[final]{changes} |
| PDF strike-out annotation | \pdfmarkupcomment[markup=StrikeOut]{text}{note} (pdfcomment) |
Next Steps
Deleted text marked? These guides cover the rest of text formatting:
- Bold, Italics & Underline –
\textbf,\emph, and the underline commands of ulem and soul - Using Colors in LaTeX – The xcolor names used for colored strikes and change tracking
- LaTeX Comments – Hide text from the output entirely, todo notes and draft switches
- Mathematical Expressions – Fractions, limits and the amsmath environments used with
\cancel - LaTeX Quotation Marks and Quotes – Correct quotation marks and block quotes
- Learn LaTeX – Complete beginner tutorial covering all the basics
Free LaTeX Tools
- LaTeX Preview – Test strikethrough and cancel code with a live PDF preview
- Math to LaTeX – Convert handwritten equations to LaTeX
- LaTeX Symbols Reference – Browse negated relations and other math symbols
Fix formatting problems faster with AI
Octree's AI editor picks the right package for strikethrough in text, math or slides, explains ulem and soul errors, and compiles your document in seconds.
Try Octree Free →