As shown in this answer, we can strikeout text like abc $x=y$ using \st or \sout from the ulem and soul package, respectively. However, both approaches don't work if the text contains an equation environment (e.g. abc \begin{equation}xyz\end{equation} abc). I know that there are options to strike out math (e.g. by \cancel from the cancel package), but how can we strikeout both?

1 Answer 1


You can put the combined contents in a tcolorbox and draw the strikeout on top using the finish key. This answer is based on the answer to Strike a paragraph of text by Ulrike Fischer. I added the pattern fill, a custom pattern with wider lines, and a new tcolorbox environment to make it easier to use the box multiple times. Note that it is not possible to partially strike out a line, because the box is rectangular. However, other strikeout patterns (horizontal lines for example) are possible by modifying the pattern for the \fill command.


 enhanced jigsaw,
 frame hidden,
 finish={\fill[pattern=mystrikeout] (frame.north west) rectangle (frame.south east);}

some text

\noindent abc

some more text


enter image description here

  • It is very nice to know the english language. For example I have not understood the question. My compliments for your answer.
    – Sebastiano
    Sep 15, 2019 at 20:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.