5
$\begingroup$

These MathJax syntaxes look fine to me:

\require{cancel}\cancel{\Longleftrightarrow} $$\require{cancel}\cancel{\Longleftrightarrow}$$

\nLeftrightarrow $$\nLeftrightarrow$$

\nRightarrow $$\nRightarrow$$

\nLeftarrow $$\nLeftarrow$$

\require{cancel}\cancel{\Longrightarrow} $$\require{cancel}\cancel{\Longrightarrow}$$

\require{cancel}\cancel{\Longleftarrow} $$\require{cancel}\cancel{\Longleftarrow}$$

Now, what can we say about these Mathjax syntaxes?

\require{cancel}\cancel{\Leftrightarrow} $$\require{cancel}\cancel{\Leftrightarrow}$$

\not \Longleftrightarrow $$\not \Longleftrightarrow$$

\not \Longleftarrow $$\not \Longleftarrow$$

\not \Longrightarrow $$\not \Longrightarrow$$

Seems like it doesn't look very good to me ...(essentially the first two)

  • Can these syntaxes be considered good?

  • Can we do the long version of this syntaxis?

\nLeftrightarrow $$\nLeftrightarrow$$

Because,as it seems \nLongleftrightarrow syntax

$$\nLongleftrightarrow$$ doesn't work.

$\endgroup$
21
  • 10
    $\begingroup$ It might be a good idea to also be kind to comment after down-vote. $\endgroup$ – lone student Mar 27 at 16:25
  • $\begingroup$ You question will only mean anything if you use, e.g. if you include the formatting before revealing the output. Everything wrt what you like could have been preceded by once writing, at the start of the list $\require{cancel}$ which doesn't appear: (blank) $\require{cancel}$. After doing that. everything in that list could have been written with $\cancel{foo}$ to get $\cancel{foo}$. I think you're overc-omplicating things. $\endgroup$ – amWhy Mar 27 at 16:55
  • 1
    $\begingroup$ @amWhy My question is only addressing the arrow signs. For example, this sign does not look good. $$\not\Longleftrightarrow$$ Isn't it better to cross in the middle? For example, in my school book, this arrow crosses the middle. $\endgroup$ – lone student Mar 27 at 17:00
  • 3
    $\begingroup$ But as I said, your post makes it difficult for users to know how you formatted the mathjax that results in the input you wrote, and I have no time to click, click, click with umpteem pupups, to see your formatting. Note how everything I formatted in my comment, I revealed the mathjax. You might want to consider doing the same. $\endgroup$ – amWhy Mar 27 at 17:00
  • $\begingroup$ You're not hearing me, just as you didn't yesterday. I've nothing more to say in response to your last comment. $\endgroup$ – amWhy Mar 27 at 17:01
  • $\begingroup$ @amWhy Well. Now it's clear what you mean. I thought it didn't matter as I was mainly asking about the looks part. No problem. I do. $\endgroup$ – lone student Mar 27 at 17:07
  • $\begingroup$ Thanks, @lonestudent, for the edit. One thing I thought of was "I wouldn't use $\require{cancel}\cancel{=}$ = $\require{cancel}\cancel{=}$.but instead would write \neq to get $\neq$. $\endgroup$ – amWhy Mar 27 at 19:09
  • $\begingroup$ It takes some time to know various shortcuts, and when they apply. So sometimes it takes a bit of experimenting. It can be exasperating at times. $\endgroup$ – amWhy Mar 27 at 19:10
  • $\begingroup$ And \not sometimes works wonderfully, e.g.for "A is not a subset of B" we can write A\not\subseteq B which shows $A \not\subseteq B$. Using A \nsubseteq B renders the same. $\endgroup$ – amWhy Mar 27 at 19:13
  • $\begingroup$ @amWhy It seems that you are active in the meta. Not me. You may ignore my inexperience a little bit. :) $\endgroup$ – lone student Mar 27 at 19:14
  • $\begingroup$ I'm sorry if you felt I was ignoring your inexperience earlier. I returned to try and be more helpful. $\endgroup$ – amWhy Mar 27 at 19:16
  • 4
    $\begingroup$ I'd summarize that if the operator or symbol is long, typically using \require{cancel} \cancel{foo} is your best bet, and the nice thing is, if you use, e.g., \Longleftrightarrow multiple times that all need to be canceled, you only need to write require{cancel} once $\endgroup$ – amWhy Mar 27 at 19:22
  • 1
    $\begingroup$ \not \longleftrightarrow should be avoided. That's why I posted my last comment. It's a matter of learning which formatting to use in different circumstances. But given the preview window when editing or writing, if what you tried doesn't look like what you want, you've got a few tricks in your pocket to try something else. $\endgroup$ – amWhy Mar 27 at 19:26
  • 1
    $\begingroup$ No I agree with you, \not\Longleftrightarrow looks terrible. In fact I experimented with it to test it, given your previous question, and it looked aweful. $\endgroup$ – amWhy Mar 27 at 19:59
  • 1
    $\begingroup$ You are doing very well with your English. I posted an illustration below to show how from the get-go, you can write $\require{cancel}, if you plan to use cancel in your post. This can simplify is further user, particularly in any post you may need to "cancel" a number of things. $\endgroup$ – amWhy Mar 27 at 20:58
5
$\begingroup$

I don't really understand the question. But I think at least part of the question is how to have a reasonable looking "long arrow" version of $\nLeftrightarrow$ and so on. The OP is aware of the cancel package, but the result of e.g. \cancel\iff$\cancel\iff$ IMO is suboptimal. Here I suggest a variant with some \hspace commands. I made the space taken out/put back in equal on both sides, so it should look approximately OK* in most browsers / math renderers. There is \require{cancel}$\require{cancel}$ at the start of this post.

  1. $a\iff b$a\iff b

  2. $a\cancel{\iff}b$a\cancel{\iff}b

  3. $a\hspace{1em} \cancel{\hspace{-1em}{\iff}\hspace{-1em}}\hspace{1em} b$a\hspace{1em}\cancel{\hspace{-1em}{\iff}\hspace{-1em}}\hspace{1em}b

  4. $a\implies b$a\implies b

  5. $a\cancel{\implies}b$a\cancel{\implies}b

  6. $a\hspace{1em} \cancel{\hspace{-1em}{\implies}\hspace{-1em}}\hspace{1em} b$a\hspace{1em}\cancel{\hspace{-1em}{\implies}\hspace{-1em}}\hspace{1em} b

  7. $a\impliedby b$a\impliedby b

  8. $a\cancel{\impliedby}b$a\cancel{\impliedby}b

  9. $a\hspace{1em}\cancel{\hspace{-1em}{\impliedby}\hspace{-1em}}\hspace{1em} b$a\hspace{1em}\cancel{\hspace{-1em}{\impliedby}\hspace{-1em}}\hspace{1em}b

If one wants to use these in a post, it probably makes sense to use \newcommand at the start of your post:

\newcommand{\niff}{\hspace{1em}\cancel{\hspace{-1em}{\iff}\hspace{-1em}}\hspace{1em}}
\newcommand{\nimplies}{\hspace{1em}\cancel{\hspace{-1em}{\implies}\hspace{-1em}}\hspace{1em}}
\newcommand{\nimpliedby}{\hspace{1em}\cancel{\hspace{-1em}{\impliedby}\hspace{-1em}}\hspace{1em}}

After these definitions, a\niff b will produce $\newcommand{\niff}{\hspace{1em}\cancel{\hspace{-1em}{\iff}\hspace{-1em}}\hspace{1em}}a\niff b$, etc.

*In contrast with using negative space to overlay two symbols on top of each other; I do not know how to place the second symbol perfectly centered on top, in all browsers. In particular, nothing in this Answer looks good in my browser.

$\endgroup$
4
  • 3
    $\begingroup$ Yes, there are two differences. Firstly there is the spacing:$$a\bbox[red]{\Longleftrightarrow} b$$ $$a\bbox[red]{\iff} b$$ The spacing for \iff is larger than that of a normal binary operator like \times$\times$. Secondly, the name of the command \iff explains what it is supposed to mean, while the name of \Longleftrightarrow explains what it is supposed to look like. Generally, I prefer command names like \iff, as then I can type almost exactly the same thing that I am thinking. (There is a minor third point that \iff is shorter to type.) $\endgroup$ – Calvin Khor Mar 28 at 8:40
  • 1
    $\begingroup$ (+1) In the first part of the question, I emphasized that the mathjax syntaxes I used did not look good. Yes, you explained the second part very well. 369. This is the syntaxes that I was looking for.!! In the meantime, let me ask you this. Is there any difference between the 'iff' command and the 'Longleftrightarrrow'? I deleted and rewrote my comment because it contains grammar errors. still there but less maybe. Thank you!! $\endgroup$ – lone student Mar 28 at 8:43
  • $\begingroup$ Yes, you definitely said the commands I was looking for! This answer deserves more upvotes. My mathjax command knowledge at the minimum level. Sometimes I have good solutions. But because I don't know the some commands, I sometimes avoid answering questions. $\endgroup$ – lone student Mar 28 at 8:58
  • 1
    $\begingroup$ @lonestudent glad to help, if you need to talk to someone about mathjax, you could try a chat room like the one specifically for Mathjax or perhaps the main chat room of Math.SE. Don't forget that there is also the very complete reference here. $\endgroup$ – Calvin Khor Mar 28 at 9:03
6
$\begingroup$

Illustration for the OP here, given our discussion above.

Here's an example of how \require{cancel} can be worth declaring at the start of the post. Please click on "edit" to see how I wrote this.

$\require{cancel}$

Provided $x\neq 1$, we have: $$\frac {x^2-1}{x^3-1} = \frac{\cancel{(x-1)}(x+1)}{\cancel{(x-1)}(x^2 + x + 1)} = \frac{x+1}{x^2 + x + 1}.$$

This is particularly useful in a longer post in which you plan to use \cancel multiple times.

$\endgroup$
2
  • 4
    $\begingroup$ I'm definitely in favor of this form of cancel culture. :--) $\endgroup$ – JonathanZ supports MonicaC Mar 27 at 21:20
  • $\begingroup$ Hah! I like that! ;D $\endgroup$ – amWhy Mar 27 at 21:25
1
$\begingroup$

$\def\nimplies{\implies\kern-1.8em/\kern1.3em}$ Seeing as the command \cancel from the package cancel has been recommended both in this question and in this earlier question on a similar subject, I repeat here the issue that I raised there: \cancel doesn't draw the stroke in the correct colour --- it appears to draw it in black, which is sometimes incorrect, especially when the background is black. Instead, how about defining a token to typeset the symbol you want crossed out (\iff or whatever), an appropriate negative \kern, / (the cancelling stroke) and an appropriate positive \kern to achieve the desired spacing at the right? For example, here's a way to use a crossed-out \implies symbol: first define a token \nimplies for that symbol, by $\def\nimplies{\implies\kern-1.8em/\kern1.3em}$, then you can write e.g. $P\nimplies Q$ for $P\nimplies Q$. Here's one I lined up against an \implies to check the spacing:

$\begin{gather} P\implies Q\\P\nimplies Q \end{gather}$

The stroke is about .05em to the left of the middle of the shaft, but I think it looks better slightly to the left, as the symbol's left end is less cluttered than its right end. If you want the stroke accurately centred, then $\def\nimplies{\implies\kern-1.75em/\kern1.25em}$.

$\endgroup$
6
  • $\begingroup$ How are you getting mathjax to render in non-black, and how are you getting Math.SE to have a black background? Also on my computer its very off the mark, cf the footnote of my answer (but I do get nicer results with your code if I use the common HTML math renderer. I just like using the HTML-CSS renderer) $\endgroup$ – Calvin Khor Mar 29 at 11:26
  • $\begingroup$ I user Windows 8.1 and the High Contrast Black theme. // Both Google Chrome and Firefox render the stroke centred (modulo the .05em difference mentioned above), as does SumatraPDF when rendering a PDF produced when I do the same thing in TeX. Which browser did you use to produce your image? $\endgroup$ – Rosie F Mar 29 at 11:36
  • $\begingroup$ I agree that it's correct in TeX as well. To reproduce my output, the easiest way is to find a Mac and run the page on Safari :) I think, if you use the HTML-CSS renderer and install the STIX fonts on your Windows computer, you will get a similar result. I could switch to the common HTML renderer, but (a) I'm used to the appearance of HTML-CSS and (b) anyone using a mac will default to it, so its possible your readers would see it off-center as well. Its less an issue in TeX where the unchanging PDF is usually what you distribute $\endgroup$ – Calvin Khor Mar 29 at 11:41
  • $\begingroup$ The wrong position of the slash is a font issue. I haven't found an mathmode font that places the stroke so near the left-hand end as in your screenshot, but with Times as loaded by package txfontsb, it's slightly too far to the left; with Fourier as loaded by package fourier, it's even further to the left. OK -- by using kerns to overlay two glyphs I've avoided "cancel"'s colour bug, but I've created a font-dependency. A question for Tex.SE perhaps? $\endgroup$ – Rosie F Mar 29 at 11:51
  • $\begingroup$ That sounds correct to me. The STIX fonts in TeX might well reproduce it. And nope, mathjax is specifically off-topic in TeX.SE (hence why there are many posts about Mathjax in math.meta :) ) In TeX, there's a nice package for overlaying symbols that I can't remember the name of. I don't know if it works well with different fonts $\endgroup$ – Calvin Khor Mar 29 at 11:55
  • $\begingroup$ its the stackengine package, see for eg tex.stackexchange.com/questions/413333/overlay-symbols $\endgroup$ – Calvin Khor Mar 29 at 12:03

You must log in to answer this question.

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