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}
1
  • 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? ;-)
    – user31729
    Jun 4, 2015 at 9:10

1 Answer 1

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}
1
  • It is funny the author of the cancel package 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, 2015 at 21:37

You must log in to answer this question.

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