it seems like this unicode character does not get interpreted and throws an error (unexpected token, the usual).
General question: we're currently switching over from MathJax (performance...), and therefore have a LOT of formulas that used to work on MathJax but don't anymore (most notably the \mathbb stuff). I'm just curious: why don't you support the syntax and just resolve those symbols to unicode? That's what we're doing now with \mathbb{R}, unfortunately we have to use a standard F for the time being until this works.
The same issue also applies to the double struck I and K and probably a lot of other chars.
I'll leave the Unicode double-struck characters for @ronkok to comment on, but it sounds like we should support those. One related question: does your formula work on LaTeX? That is our standard reference, not MathJax.
You can add support for them now by adding a macro mapping e.g. "𝔽": "{\mathbb F}".
KaTeX has generally shied away from supporting characters incorrectly, but I agree that it would be nice to have a "just render it somehow" option. I can try to add one.
It does work in LaTeX. I would absolutely love that, would solve pretty much all our issues :)
@yorrd We've been adding Unicode characters in small steps. There were a couple of PRs two years ago that tried to add all characters at once. The discussion about those PRs got bogged down because a few characters have ambiguous mappings. Should ⊥ be a relation or a textord? KaTeX wanted to avoid getting any of those calls wrong and have to do breaking changes later.
So we've been adding characters in smaller, more digestible chunks of the Unicode table. And we haven't yet gotten to anything outside the Unicode basic multi-lingual plane. That's why 𝔽 is not yet accepted.
@edemaine There are nearly a thousand characters in the Unicode table for Mathematical Alphanumeric Symbols. Do you have any ideas for doing that compactly? Or do we write 1000 macros?
Or do we write 1000 macros?
I don't mind writing 1000 macros. I can automate part of it. I just wonder if there is some elegant way to support those characters that will render faster and/or allow us to ship less code.
@ronkok Thinking about the mathbb characters as a starting point (and maybe that's a good next Unicode PR to work on), I could see doing a for loop over 0..25 and constructing the Unicode and ASCII character codes in the loop (and still doing defineMacro in the loop).
For more special characters where we need a big mapping, I also wonder about using a big object (and maybe one defineMacros call) instead of many calls to defineMacro. Alternatively, macros.js could be replaced by one big object instead of many calls to defineMacro...
I have an idea that I'm working up. I'll have a PR ready in a day or two.
Related: #260
Fixed by #1232
Most helpful comment
@yorrd We've been adding Unicode characters in small steps. There were a couple of PRs two years ago that tried to add all characters at once. The discussion about those PRs got bogged down because a few characters have ambiguous mappings. Should ⊥ be a relation or a textord? KaTeX wanted to avoid getting any of those calls wrong and have to do breaking changes later.
So we've been adding characters in smaller, more digestible chunks of the Unicode table. And we haven't yet gotten to anything outside the Unicode basic multi-lingual plane. That's why 𝔽 is not yet accepted.
@edemaine There are nearly a thousand characters in the Unicode table for Mathematical Alphanumeric Symbols. Do you have any ideas for doing that compactly? Or do we write 1000 macros?