3
$\begingroup$

I recently tried to edit an old question x-th moment method that had got bumped to the front page for other reasons. The post had an equation that was meant to be, and maybe at one point was, struck through, but it no longer is. That is, the source says <strike></strike>, but the rendered code has no strike-through. I tried ~~~~ and <s></s>, without luck, and eventually (since it seemed worse to have a known-wrong equation in the text without explicit indication) deleted it; but clearly this is not the best solution. How does one strike through in MO's flavour of Markdown?

EDIT: On experimentation, it seems to be about MathJax, not MarkDown: 1 + 1 = 2 versus $1 + 1 = 2$ (both surrounded by <strike></strike>). Is there a way to strike through an equation?

$\endgroup$
4
  • 1
    $\begingroup$ Yes, there is \require{cancel}\cancel{1+1=2} $\require{cancel}\cancel{1+1=2}$ and \require{enclose}\enclose{horizontalstrike}{1+1=2}$\require{enclose}\enclose{horizontalstrike}{1+1=2}$. There are some other options in the "Crossing things out" answer on the mathjax reference page of math.se (takes a while to load) $\endgroup$ Feb 26, 2022 at 1:08
  • $\begingroup$ @CalvinKhor, thanks! Would you post that as an answer so that I can accept it? $\endgroup$
    – LSpice
    Feb 26, 2022 at 1:58
  • 1
    $\begingroup$ Sure, I've just done that. Glad to help! $\endgroup$ Feb 26, 2022 at 2:33
  • 1
    $\begingroup$ A related post on Mathematics Meta: Striking out equations. Another post on this meta, which is also a bit related (but not the same): Cancel command in MO post/ $\endgroup$ Feb 26, 2022 at 4:51

2 Answers 2

5
$\begingroup$

Yes, there is \require{cancel}\cancel{1+1=2}$$\require{cancel}\cancel{1+1=2}$$ and \require{enclose}\enclose{horizontalstrike}{1+1=2}$$\require{enclose}\enclose{horizontalstrike}{1+1=2}$$ There are some other options in the "Crossing things out" answer on the MathJax reference page of Math.SE (takes a while to load, so here's a screenshot.)

\require works like \usepackage. It seems that unlike \newcommand, we only require one \require command for the whole page, but I'm not sure. We should probably refrain from this command in titles (though this is probably more an issue for \newcommand.)

$\endgroup$
3
  • 2
    $\begingroup$ It seems that unlike Math.SE, the above \require, either in the above comments or this answer causes the package to work for this comment as well: $\cancel{1+1=2}$,$\enclose{horizontalstrike}{1+1=2}$ gives $\cancel{1+1=2}$,$\enclose{horizontalstrike}{1+1=2}$ I have tested a comment on a separate meta.MO page (now deleted) and \cancel did not work. $\endgroup$ Feb 26, 2022 at 2:45
  • 2
    $\begingroup$ Whether in the comments or in your answer, the \require seems to affect other answers, too. Posts are 'insulated' in their own groups (in the TeX sense), which I would expect to prevent this, but maybe comments aren't, or maybe the 'insulation' lets \requires escape? $\endgroup$
    – LSpice
    Feb 26, 2022 at 3:22
  • 2
    $\begingroup$ @LSpice Sorry, I was wrong, \require escapes comments even on math.se. Screenshot here (also tested on MO). After posting a comment with \require, the first comment's \cancel was re-rendered correctly. First comment originally looked like this. $\endgroup$ Feb 26, 2022 at 6:59
1
$\begingroup$

This is not really an answer, just a test in response to @CalvinKhor's comment.

\require in one answer (or comment?) seems to affect other answers. This may depend on which answer comes first, though.

$\cancel{1 + 1 = 2}$, $\enclose{horizontalstrike}{1 + 1 = 2}$.

$\endgroup$

You must log in to answer this question.

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