Open wspr opened 5 years ago
my personal preference would be not to force math mode and not to flag any error, I don't think the plane 1 math alphabets are that different to characters in the BMP math operator blocks, I can use ∮ in text mode and if the font in use has it it all just works, obviously just as a text character without any math spacing, and I think the same is true of 𝗔 it may be that current "text" fonts don't include the math alphabets but that isn't clearly always going to be the case, and you may have a custom virtual or combo font set up for this, so I don't think unicode-math should be affecting the non-math use of these characters.
I agree that silently entering maths mode to do the right thing would be the wrong approach, as you’d get obvious edge cases with incorrect spacing. I like the analogy with script/language ideas in general — you can’t fix or enforce in general, so why do it for maths?
OTOH for the vast majority of users, having a maths symbol in text mode is almost certainly a syntax error, and if we have a mechanism to call an error I like the idea it could be a possibility. Perhaps unicode-math could have a “strict” mode…
From the LuaTeX mailing list:
I think we could reasonably say that such a blatant insertion of a maths symbol in text mode could be at least trapped more obviously.
I had always intended eventually to make such slots math-active, which would be easy enough to insert a text mode definition for. Not saying I'd allow it, just logging here for future reference.