2
$\begingroup$

How do I write letters like the following in mathjax?

enter image description here

$\endgroup$
2
  • $\begingroup$ You can also use this to look for individual symbols. Some preset "not" type symbols are already there. $\endgroup$ Jul 7, 2023 at 13:10
  • $\begingroup$ The syntax "\require{cancel} \cancel {a+b}" works. You only need to use the "require" command once per session. See the tutorial $\endgroup$
    – lulu
    Jul 8, 2023 at 15:53

2 Answers 2

12
$\begingroup$

If there exists a specific symbol, you should use that: such as \notin $\notin$, \neq $\neq$, \nmid $\nmid$.

Alternatively, you can use \not. For example, \not\in $\not\in$, \not= $\not=$, \not\mid $\not\mid$, \not\equiv $\not\equiv$.

I will quote from "MathJax basic tutorial and quick reference" - current revision: "You can use \not to put a slash through almost anything: \not\lt $\not\lt$ but it often looks bad."

$\endgroup$
2
  • 5
    $\begingroup$ \not\exists looks OK: $\not\exists$, but \not\forall doesn't: $\not\forall$. $\endgroup$
    – GEdgar
    Jul 7, 2023 at 13:36
  • $\begingroup$ I wonder if \not\in isn't now special-cased to expand to \notin. I can remember earlier times when it looked substantially worse than \notin. Certainly \not\mid must be doing that. $\endgroup$
    – MJD
    Jul 15, 2023 at 16:52
2
$\begingroup$

@MartinSleziak has already mentioned almost everything important, so I would only mention a few alternatives and additional information.

For a character/symbol (which I will write as [symbol]) you don't necessarily have to write \not[symbol]. Alternatively, you can also use \not{[symbol]} (both look the same, but it's useless if you use it quite often in one line or it's not a $\LaTeX$ command that you have to write with \. E.g. \not{a} is $\not{a}$.

Unfortunately, some $\LaTeX$ symbols cannot be written correctly with \not{[symbol]} and do not have \not[...] in their names. Instead they use \n[...]. E.g. \nsupseteqq is $\nsupseteqq$, but \notsupseteqq does not exist and \nsupseteqq ($\not{\supseteqq}$) looks much different. For some symbols even this doesn't work. E.g. you have to write \varnothing for $\varnothing$.

If you don't like any of the variants, you can also use \![...]\! / Use as an alternative. \! is a kind of negative line spacing, which moves your text after it (here the /) further into the character before it. E.g. x \!\! / is $x \!\! /\!$, x \!\!\! / is $x \!\!\! /$, x \!\!\!\! / is $x \!\!\!\! /\,$ and \not{x} is $\not{x}$. The same goes for \backslash ($\backslash$) or \setminus ($\setminus$). With this you can also get other symbols like $\therefore \!\! \because$ (\therefore \!\! \because).

$\endgroup$
1
  • $\begingroup$ +1 : kudos for mentioning negative line spacing. $\endgroup$ Nov 16, 2023 at 3:02

You must log in to answer this question.

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