# How to strike out an entire group of text

I am using the command \sout{some text} to strike out a word or a sentence; However, I wanted to know if it is possible to strike out a group of text without having to use the braces { and }.

Something similar to what {\color{red} some text} is to \textcolor{red}{some text}, or something like \begin{sout} and \end{sout} (this doesn't work!)

• Must it also handle text style and/or display style math automatically? Mar 8, 2016 at 16:17
• Hi Steven! Thank you for your answer. I do not need to strike out maths, but I need the keep paragraphs/fonts intact Mar 8, 2016 at 16:22

This uses a variation on my censor package to accomplish the strikeout, since the \xblackout macro of that package can work across paragraph boundaries (but not across math, which the OP clarified is not needed).

To make the \xblackout macro operate as an environment, I used the environ packages feature of \BODY. Even so, I had to go through an intermediate macro \soutrefunexp in order to expand \BODY once, to make it digestible to \xblackout.

\documentclass{article}
\usepackage{environ,censor,calc}
\NewEnviron{mysout}
{\soutrefunexp{\BODY}}
%%%%%%%%%%%
\censorruleheight=.1ex %THICKNESS OF CENSOR RULE
\newlength\nextcharwidth
\makeatletter
\renewcommand\@cenword[1]{%
\setlength{\nextcharwidth}{\widthof{#1}}%
\censorrule{\nextcharwidth}%
\kern -\nextcharwidth%
#1}
\makeatother
\newcommand\soutref[1]{\censorruledepth=.55ex\xblackout{#1}}
\newcommand\soutrefunexp[1]{\expandafter\soutref\expandafter{#1}}
%%%%%%%%%%%
\begin{document}
What is this?

Another paragraph.

\begin{mysout}
What is this?

Another paragraph.
\end{mysout}

What is this?

Another paragraph.
\end{document}


Replacing \xblackout with \blackout produces the following slightly different result: