Why the \cancel command does not work in the last part of the following post:

A cohomology associated to a Riemannian manifold

I would like to strike through the last part of the question.

  • I took liberty to edit the linked question using <s>...</s> for strike through. (At the same time i corrected some typos.) Here is link to the revision after my edit. Is that at least approximately what you wanted to achieve? (I should also say that already without using this the last sentence is sufficiently set apart from the text of the text.) – Martin Sleziak Apr 21 at 6:06
  • @MartinSleziak Thank you for your answer to my meta and your kindly edit of my MO post. – Ali Taghavi Apr 21 at 6:17
up vote 3 down vote accepted

There are several things that should be said about your question.

It is, in my opinion, a bad practice to use MathJax for formatting and not for Mathematics. So it is not good to use MathJax to achieve strikethrough. (MathJax also gives information which part is mathematical formula and which part is text. This information is used, for example, by screen readers, by search engines that specialize in search for mathematical formulas, etc. In general, it is better to avoid mixing between syntax and semantics, between formatting and marking type of text - in this case distinguishing between mathematics and normal text.)

Some related posts from the past:

If you want to strike out some part of the text, use <s>...</s>. The disadvantage is that it skips formulas, but otherwise I think it is clear.

I would advise against using MathJax for the purposes you want to use to link it in your question, i.e., to strike through a long text. (Of course, there are still reasonable uses when this command can be used as part of mathematical formula.)

Example: <s>This is merely an example text but ... </s>

This is merely an example text but I was too lazy to copy lorem ipsum from somewhere. To include at least one formula here, let's go with König's theorem: $\sum_{i \in I}\kappa_i < \prod_{i \in I}\lambda_i.$ I also wanted to include a bit of MarkDown such as url (I linked to Wikipedia), bold or italics to see whether it works.

See also: How to strike text? and Does markdown have a way to express strikeout? on Meta Stack Exchange. (As mentioned there in chat you can use ---this--- to achieve similar effect.)


To address the TeXnical issue, you need to include \require{cancel} if you want to use \cancel. See also: MathJax \cancel not working (Mathematics Meta).

That is, unless the configuration for MathJax which this site uses is changed in such way that this is loaded automatically. A bit more details on this can be found here: Poll for MathJax macros that should be automatically loaded (Mathematics Meta).

Example: $$\require{cancel}\cancel a + b= \cancel a+ c$$ $$\require{cancel}\cancel a + b= \cancel a+ c$$


In the current revision (at the time I posted this answer) of the post you linked, the \cancel command does not work for two reasons. Firstly, you cannot expect MathJax command work outside MathJax environment. (I.e., it has to be marked by dollars or some other way which denotes MathJax.)

\cancel{ \text{Does this sequence of cohomologies detrmine the geometry of $N$? Namely is it true to say that two nonisometric metrics on $N$ give two different cohomolgy sequence?}}

Even if you add dollars it will only work if also \require{cancel} is included (between dollars) somewhere in your post. You can see here that it looks quite ugly. (And for long text it goes over the page width, which is why I copied only the first sentence. I wrote: $\cancel{ \text{Does this sequence of cohomologies detrmine the geometry of N?}}$.

$\cancel{ \text{Does this sequence of cohomologies detrmine the geometry of N?}}$

This is how it looks using html tags.

Does this sequence of cohomologies detrmine the geometry of N? Namely is it true to say that two nonisometric metrics on N give two different cohomolgy sequence?

Which was achieved using: <s>Does this sequence of cohomologies detrmine the geometry of N? Namely is it true to say that two nonisometric metrics on N give two different cohomolgy sequence?</s>

You must log in to answer this question.

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