I am using Soul to mark the change to my manuscript in Overleaf, but it won't work for equations, like


\st{E = mc^3} E=mc^2  

what I want to see is an overstrike on E = mc^3, followed by E = mc^2


  • Let me guess: they are looking for something to mark revisions on a document.
    – Rmano
    Jul 18, 2023 at 15:58
  • @Rmano yes, you are right Jul 18, 2023 at 16:07
  • 3
    @majordoctor: Please update your post with a more direct description of what you want; not just a "I've tried this and it doesn't work" without much context. It'll remove the guesswork from the audience. Can you do that?
    – Werner
    Jul 18, 2023 at 16:26
  • 2
    Welcome. // Can you please post code, which compiles, once we copied? It‘s not much, that‘s missing, but it‘s annoying to guess where you can easily EDIT … Thank you.
    – MS-SPO
    Jul 18, 2023 at 17:48
  • 1
    @MS-SPO, I added. I tried, but the error is missing $$ even in equation mode Jul 18, 2023 at 18:40

1 Answer 1


Use the ulem and xcolor packages and define a new command as described here.





\rst{Red line through this} but not through this.

\rst{$E=mc^3$} $E=mc^2$


Don't forget to wrap your equations in math mode.

enter image description here

  • Sorry, what are wrap equations? I am encountering the error: Missing } inserted. LaTeX Error: Bad math environment delimiter. Missing number, treated as zero. Missing $ inserted. Extra }, or forgotten $. Illegal unit of measure (pt inserted). Missing $ inserted. Jul 18, 2023 at 21:48
  • @majordoctor Your equations should have the math delimiters on either side. So "$E=mc^3$" not "E=mc^3" Jul 19, 2023 at 17:07

Not the answer you're looking for? Browse other questions tagged .