I'm preparing for a presentation in which I would like to show some source code with bits struck out. Does anyone know a package that can do that? I've googled but can't find anything.
Here's my MWE, based on the listings package (for listings) and ulem (for the strikeout) albeit in the beamer environment
\documentclass{beamer}
\usepackage{listings}
\usepackage[latin1]{inputenc}
\usepackage{ulem}
\usetheme{CambridgeUS}
\usecolortheme{seahorse}
\title[Test]{Test}
\author{Me}
\institute{Stuff}
\date{\today}
\begin{document}
\lstset{moredelim=[is][\sout]{|}{|}}
\begin{frame}[fragile]{Test}
\begin{lstlisting}[]
text
|text|
\end{lstlisting}
\end{frame}
\end{document}
Unfortunately the strikeout begins from the start of the line as shown below
Update
Putting a single character before the strikeout stops it from being so greedy
\begin{frame}[fragile]{Test}
\begin{lstlisting}[]
text
.|You will not pass|
\end{lstlisting}
\end{frame}
Result
Now if only I could replace the dot with a non printable character.

