4

I want to strikeout a part of my paper. In particular, this one:

When bla bla $s$ bla bla $v$, bla bla $\boldsymbol{x}_{v}$, bla bla, the equation is:
\begin{eqnarray}
\displaystyle p_{v,s} & = & \displaystyle v+s = \nonumber\\
& = & \displaystyle  v^{2} - s^{3}. \label{eqn:pvs}
\end{eqnarray}

I've tried with \cancel but this only works with the first part of the text:

\cancel{When bla bla $s$ bla bla $v$, bla bla $\boldsymbol{x}_{v}$, bla bla, the equation is:}

and I get error when I use it on eqnarray. I've also tried \sout but the result was the same.

Additions

This is what I get when I use \sout on the text part. I would like that also the equation is stricken out!

enter image description here

3
  • 2
    As a starting point, see eqnarray vs align (in favour of using amsmath's align environment(s)). Then, you're probably including the alignments & inside the \cancel, which cannot be done. Can you include a visual of what you're after exactly in the form of an uploaded image?
    – Werner
    Nov 25, 2013 at 17:55
  • The \displaystyle directives to the right of the alignment points are unnecessary.
    – Mico
    Nov 25, 2013 at 18:45
  • Thanks! Do you mean that \displaystyle affects \cancel or \sout? Nov 25, 2013 at 18:47

1 Answer 1

6

It is not possible to directly span a \cancel or \sout across the alignment points & since each "cell" forms a group. That is, you want to start inside one group and span across to another group. One way around this might be to use tikzmark to remember left/right nodes inside a display, or overlay the strikeout after the fact. I've chosen to do the latter here:

enter image description here

\documentclass{article}
\usepackage{amsmath,ulem}% http://ctan.org/pkg/{amsmath,ulem}
\begin{document}
\sout{When bla bla~$s$ bla bla~$v$, bla bla~$\boldsymbol{x}_v$, bla bla, the equation is:}
\begin{align}
  p_{v,s} &= v + s\llap{\sout{\phantom{$p_{v,s} = v + s$}}} \nonumber \\
          &= v^2 - s^3.\llap{\sout{\phantom{$= v^2 - s^3.$}}} \label{eqn:pvs}
\end{align}
\end{document}

The idea is to set the equation as-is and then (at the end of each row/line) insert a zero-width left overlap where you \sout (or \cancel) the same equation. Using \phantom gives you the correct spacing without re-setting the content.

If you use the same approach using eqnarray, you'll obtain an incorrect layout, since eqnarray doesn't provide the correct spacing around the aligned item.

You must log in to answer this question.

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