Whitespace after \neq command
Using the \neq command always adds whitespace after the symbol, which leads to awkward typesetting.
(\neg (a \Rightarrow \neg b) \lor {(c \land \neg a)}) \Leftrightarrow (a \Leftrightarrow d)
is rendered as
When comparing to KaTeX it gets rendered correctly:
We can advise users to workaround this by using mathord, but it is not very user friendly
(\mathord{\neg} (a \mathbin{\Rightarrow} \mathord{\neg} b) \mathbin{\lor} {(c \mathbin{\land} \mathord{\neg} a)}) \mathbin{\Leftrightarrow} (a \mathbin{\Leftrightarrow} d)
Is this intentional?
Nice report — the \mathord comparison makes the cause pretty clear.
I think this isn't whitespace being added, it's \neg being classified as a relation (mrel) instead of ordinary (mord).
MathLive 0.111.1 renders \neg b as:
<span class="ML__ams">¬</span>
<span style="display:inline-block;width:0.28em"></span>
<span class="ML__mathit">b</span>
That 0.28em is the same gap MathLive puts on both sides of \Rightarrow. \lor gets 0.23em. The ratio 0.28 / 0.23 ≈ 1.22 lines up with TeX's thick space vs medium space (5mu : 4mu), so it's the atom class driving the width, not the spacing logic.
Two more data points that support this:
\forall xand\exists yproduce no gap. (The0.04emonyis italic correction, unrelated.) So this isn't "all prefix logic operators are treated as relations" — it's specific to\neg/\lnot.\neg(a)also gets the gap before the(, which fits relation-class spacing rather than something applied only between an operator and its operand.
So my guess is it's unintentional — TeX defines \neg as class 0 (Ord), and \lnot is the same glyph mapped to the same character.
Suggested fix: change the atom class of \neg (and \lnot) from mrel to mord in the definitions.
On catching the rest: rendering the full symbol set and looking for a zero-content display:inline-block span with a fixed width inserted between two atoms is a cheap way to find this whole class of bug at once, instead of reporting them one at a time. I haven't run it across the whole set, but among the logic operators I tested, \neg / \lnot were the only ones affected.