svenkreiss / unicodeit

Converts LaTeX tags to unicode: \mathcal{H} → ℋ. Available on the web or as Automator script for the Mac.
https://www.unicodeit.net
Other
275 stars 35 forks source link

order of \not character reversed on unicodeit.net #55

Closed rigille closed 1 year ago

rigille commented 2 years ago

Typing

0 \not\in \mathbb{N}

I expected to get

0 ∉ ℕ

Instead I got

0 ̸∈ ℕ

and

0 \in\not \mathbb{N}

yields the expected result. So maybe the order of the \not character should be swapped with the next character?. By the way 0 ∈ ℕ hahha

cemulate commented 1 year ago

Just leaving some info after my own investigation:

\not\subset

produces

\xCC\xB8\xE2\x8A\x82

Which renders incorrectly in most contexts as "̸⊂"

\xCC\xB8 is a "combining long solidus overlay" and the rest is "subset of". According to the standard, combining characters should come after the original. So though this is a faithful literal rendering of the input, it is not the "correct" or expected result.

This is why if you use

\subset\not

The literally-rendered result will be

\xE2\x8A\x82\xCC\xB8

Which contains the combining character after the subset character and produces the correct result: "⊄"


I see two options for a "fix":

cemulate commented 1 year ago

I submitted a PR #61 to handle cases like this.

HDembinski commented 1 year ago

This should be closed since the PR was merged.