7

I have a document in which I want to strikeout whole paragraphs including all equation and eqnarray environments. Available options such as sout (from ulem) works on paragraph but not in equations. Also cancel (from cancel) work only inside math, but not in paragraphs and in eqnarrays only one line at a time.

Is there a package or command that will allow to strikeout with, for example:

\strike{
%long paragraph or equation or eqnarray
}

Preferably I need a diagonal strikeout but any alternative would work. Here it is an example:

\documentclass[]{revtex4}
  \usepackage{amsmath,amsfonts,amsthm,amssymb}
  \usepackage{cancel}

  \begin{document}
  par

  \begin{eqnarray}
  %\cancel{ %cancel doesn't work for eqnarray
  f(x) & = & \sin(x) \\
  g(x) & = & \cos(x)
  %}
  \end{equation}

  par

  \end{document}
jak123
  • 4,252
  • 5
  • 26
  • 49
alfC
  • 14,350
  • Off-topic:eqnarray is too old, actually. Use align or something similar (I don't know, whether \cancel would work with align -- I doubt). You are aware that your eqnarray env. ends with equation? ;-) –  Jun 04 '15 at 09:10

1 Answers1

5

cancel works with aligned environment, but in this case the equation numbers are lost.

\documentclass[]{revtex4}
  \usepackage{amsmath,amsfonts,amsthm,amssymb}
  \usepackage{cancel}
%  \usepackage{ulem}

  \begin{document}

    \[%
    \cancel{%
      \begin{aligned}
        f(x) &=  \sin(x) \\
        g(x) &=  \cos(x)
      \end{aligned}
    }%
    \]


  \end{document}
  • It is funny the author of the cancel package https://www.ctan.org/pkg/cancel?lang=en says "Drawing slashes through math to indicate “cancellation” is poor design. I don’t recommend that you use this package at all." (emphasis mine). However I want it for "corrections". – alfC Aug 26 '15 at 21:37