Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical Supply Distributor100,000+ medical supplies. 48-hour critical dispatch.Ships from 8 regional U.S. hubs. Net-30 terms for verified institutional accounts.Shop lac.us CodeCASRAIlac.us

LaTeX Cross Out: Strikethrough for Text and Equations

Cross out text with ulem and terms in equations with the cancel package, with a command table and fixes for common errors.

Written and maintained by CASRAI Editorial Board

Last updated

Short answer: to cross out text in LaTeX, load the ulem package and use \sout{text}; to cross out terms inside an equation, load the cancel package and use \cancel{term}. Both are free CTAN packages, and the choice depends on whether you are striking prose or cancelling mathematics.

This guide is for researchers, analysts and students who need strikethrough in a LaTeX manuscript, problem set or revision draft, and who want to know which command produces which mark and why a given attempt misbehaves. It covers the variants people search for separately (cross out, strikethrough, strikeout, slash through a letter) because they all resolve to the same two packages.

What it is used for in research

Two different jobs are both called “crossing out” in LaTeX, and they use different packages.

  • Marking deleted prose. Showing text that has been removed or replaced in a revision draft, a response-to-reviewers file or a collaboratively edited document. See clean versus marked-up manuscript versions for how revised manuscripts are supplied, and LaTeX and Overleaf collaborative writing for a tracked-changes workflow.
  • Cancelling terms in mathematics. Showing that a factor cancels, a term vanishes, or a quantity tends to a value, as in a derivation or teaching handout.

Install or access

Both packages are distributed through CTAN, the Comprehensive TeX Archive Network.:

  • ulem (“Package for underlining”), maintained by Donald Arseneau, version dated 2019-11-18. CTAN lists it as included in TeX Live and MiKTeX. Page: ctan.org/pkg/ulem.
  • cancel (“placing lines through maths formulae”), maintained by Donald Arseneau, version 2.2 dated 2013-04-12, public domain. CTAN lists it as included in TeX Live and MiKTeX. Page: ctan.org/pkg/cancel.

With a package that CTAN lists as part of TeX Live or MiKTeX you load it with a \usepackage line in the preamble. In an online editor such as Overleaf the preamble line is the same.

Step-by-step: cross out text and equations

Strikethrough and strikeout for text (ulem)

  1. In the preamble add \usepackage[normalem]{ulem}. The normalem option matters (see Troubleshooting).
  2. In the body, wrap the text: The effect was \sout{significant} not significant.
  3. For a different mark, use \xout{text}, which marks the text over with a run of slashes (//////) instead of a line.

Cross out an equation or a term in math (cancel)

  1. In the preamble add \usepackage{cancel}.
  2. Wrap the term: $\frac{\cancel{x}\,y}{\cancel{x}\,z}$ draws a diagonal slash through each x.
  3. Choose the direction or shape: \cancel (diagonal), \bcancel (opposite slope), \xcancel (an X through the term).
  4. To show a term cancelling to a value, use \cancelto{0}{x}, which draws a diagonal arrow pointing to the value. This one works in math mode only.

Slash through a letter or symbol

The same \cancel, \bcancel and \xcancel commands work on a single character: $\cancel{a}$. According to the package header, the first three work in both math and text mode.

Output and how to read it

Command Package Mark produced Where it works
\sout{...} ulem A horizontal line drawn through the text Running text; can break across line ends
\xout{...} ulem Text marked over with a run of slashes (//////) Running text
\cancel{...} cancel One diagonal slash Math and text mode
\bcancel{...} cancel One diagonal slash of negative slope Math and text mode
\xcancel{...} cancel An X through the term Math and text mode
\cancelto{value}{expr} cancel A diagonal arrow pointing to the value Math mode only

Source: package headers of ulem.sty (2019-11-18) and cancel.sty (v2.2, 2013-04-12) on CTAN (checked 2026-11-07).

Rule of thumb: if the thing being struck is words in a sentence, use \sout; if it is a symbol or term in a formula, use \cancel and its relatives.

The cancel package’s author adds a design note in the package header: drawing slashes through mathematics to indicate cancellation is poor design.

Troubleshooting

Emphasized text suddenly appears underlined

The ulem header states that in LaTeX it replaces italics with underlining in \emph-phasized text. A \normalem declaration, or the normalem package option, restores normal \emph behavior. Load it as \usepackage[normalem]{ulem} unless you want underlined emphasis.

Cancel lines overprint neighboring symbols

By default the cancel package makes no change to horizontal spacing, so the slash can overprint adjacent material. Use the makeroom option to add room. The thicklines option thickens the line.

Change the color of the cancel line

With the color package loaded, redefine the color with \renewcommand{\CancelColor}{\color{red}}.

Size of the value in \cancelto

The value takes one of the options samesize, smaller (the default) or Smaller.

\cancelto gives an error in running text

It is math-mode only. Put it inside $...$ or a math environment. For other layout problems in displayed equations see starting a new line in a LaTeX equation.

You want a plain horizontal line, not a strike

A rule between paragraphs is a different task; see horizontal lines in LaTeX.

Free alternatives

Every option here is a free CTAN package; there is no paid tool involved. Descriptions are those on each package’s CTAN page.

Package CTAN description Best matched to
ulem Underline command that can break across line ends; double and wavy underlines, plus strikethrough and crossing-out Striking out prose
cancel Diagonal strike-through lines to cancel terms, and arrows with limits to cancel a term to a value, within maths expressions Cancelling terms in formulas
soul (version 3.2, 2026-03-06) Hyphenable letterspacing, underlining, and “striking out, etc.”; supports UTF-8 Another route to striking out text; consult its documentation for the exact commands

FAQ

How do I cross out text in LaTeX?

Load \usepackage[normalem]{ulem} in the preamble and write \sout{text}. This draws a line through the text; \xout{text} marks it over with slashes instead.

How do I cross out an equation or a term in a formula?

Load \usepackage{cancel} and use \cancel{term}, \bcancel{term} or \xcancel{term} in math mode. \cancelto{value}{expr} adds an arrow to a value.

What is the difference between strikethrough, strikeout and cross out in LaTeX?

They are different names for marking something as deleted. The ulem package covers strikethrough and crossing-out of text, and the cancel package covers diagonal cancellation in math.

Does strikethrough work in Overleaf?

The packages are loaded in the preamble as in any LaTeX document, and both are listed on CTAN as included in TeX Live.

How do I put a slash through a single letter?

Use \cancel{a} (or \bcancel or \xcancel) from the cancel package.

Sources (official documentation)

Checked 2026-11-07.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about LaTeX Cross Out: Strikethrough for Text and Equations

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →