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







Unfortunately the strikeout begins from the start of the line as shown below

enter image description here


Putting a single character before the strikeout stops it from being so greedy


    .|You will not pass|


enter image description here

Now if only I could replace the dot with a non printable character.

  • Related?: tex.stackexchange.com/questions/153819/… – Ignasi Jan 22 '16 at 9:06
  • Thanks. I've made some progress with the listings package. – Olumide Jan 22 '16 at 11:17
  • 1
    You're welcome. If you finally manage to get a solution for your question, remember that you can post your own answer. It can be useful for someone else. – Ignasi Jan 22 '16 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.