the problem is that this command appears not in math mode.
Then it takes \textfont for character to output.
For example one forgot \Gamma to write as $\Gamma$ and he/she
used some packages where \Gamma appeared in pdf. But such a file comes to publishing system where different packages and different fonts are used this \Gamma will silently become some other character.

lets say \mathaccent doesn't compile in text mode but \mathchar does.

luatex sources just outputs:
void math_char_in_text(mathcodeval mval)
{
....
p = new_char(fam_fnt(mval.family_value, text_size), mval.character_value);
}

that's why I'm asking about some other subtype that I could control
such situations.

subtypes already have a defined meaning

but you can consider setting an attribute in mathmode (with everymath) so that you can then (wherever) check if a character originates in math

_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to