# Strikethrough text

I am writing an article in LaTeX 2e. Part of the article describes the Sieve of Eratosthenes, and I want to show examples of how multiples of a prime are removed from the sieve by showing them in a strikethrough font. How do I create a strikethrough font in LaTeX 2e?

-

## migrated from stackoverflow.comJul 21 '11 at 14:38

This question came from our site for professional and enthusiast programmers.

Very much related: Crossing out sentences –  Martin Scharrer Jul 26 '11 at 21:23
For showing the Sieve of Eratosthenes in tikz this might be useful. –  Peter Grill Jun 4 '12 at 20:05

I'm not quite sure what you mean with creating a strikethrough font. However, for striking through text horizontally see:

http://stackoverflow.com/questions/2663944/how-to-strike-out-inside-latex-equations

So with the ulem package this becomes:

\usepackage{ulem}
\sout{Hello World}


With the soul package this is:

\usepackage{soul}
\st{Hellow world}


The ulem package seems more up to date so I would use that.

-
Soul is not available on my machine. I tried ulem. It worked, producing strikethrough text, but also converted emphasized text from italic to underline, which I do not want. So I added a \normalem declaration, and now everything works properly. Thanks! –  user448810 Jul 21 '11 at 12:57
Just to clarify on the above comment- using the command "\usepackage[normalem]{ulem}" will prevent \emph from being changed, as stated in Section 1 of the documentation (mirrors.med.harvard.edu/ctan/macros/latex/contrib/ulem/ulem.pdf) –  obfuscation Feb 11 '13 at 13:29
Strangely enough soul seems to have trouble with non-ASCII characters (for instance UTF-8 French). –  tiktak Jan 9 at 20:41

There is also the cancel package:

\usepackage{cancel}
...
\cancel{text}


The solution to Diagonal strikeout starting too low and ending too high is another option to consider.

-

This is for within an equation (I got it off of another forum) and requires amsmath and ulem to be active. The strike is quite long, so using it next to an arrow is troublesome.

\text{\sout{$TEXT$}}

-