Text FormattingStrikethrough list items?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
sjkiss
Posts: 30
Joined: Tue Nov 15, 2011 12:23 am

Strikethrough list items?

Post by sjkiss »

Hi, I've tried all the tricks I've come across for striking through text, but none seem to work for some list items that I've got. Any tips?

Code: Select all

Some code:
\documentclass{article}
\usepackage{ulem}
\begin{document}
\begin{enumerate}
\item{Item One}
\sout{\item{item Two}}
\end{enumerate}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

sjkiss
Posts: 30
Joined: Tue Nov 15, 2011 12:23 am

Strikethrough list items?

Post by sjkiss »

Hi: I answered my own question. This works.
The trick is to put the strikethrough command after the item command.

Code: Select all

\documentclass{article}
\usepackage{ulem}
\begin{document}
\begin{enumerate}
\item{Item One}
\item{\sout{item Two}}
\end{enumerate}
\end{document}


User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Strikethrough list items?

Post by cgnieder »

BTW: you know that \item has no mandatory argument, don't you?

Code: Select all

\documentclass{article}
\usepackage{ulem}
\begin{document}
\begin{enumerate}
 \item Item One
 \item \sout{item Two}
\end{enumerate}
\end{document}
site moderator & package author
sjkiss
Posts: 30
Joined: Tue Nov 15, 2011 12:23 am

Re: Strikethrough list items?

Post by sjkiss »

Uh, no. I didn't know that. Thanks for letting me know.
Post Reply