On 3/21/2019 1:03 PM, Linas Stonys wrote:
Hi, I was tracing \mathchar created nodes in text mode and they are just a simple glyph nodes with subtype 256. The problem is that there is no how to control the output changing the text font. It's ok if engine throws messages about missing characters in font. But if current font has a different character in this slot that is a problem.
Documentation says that this command is allowed in text mode:
"""""" The commands \mathchar, and \Umathchar and control sequences that are the result of \math- chardef or \Umathchardef are also acceptable in the horizontal and vertical modes. In those cases, the \textfont from the requested math family is used. """"""
but maybe could be any other subtype assigned to the glyph node that these characters could be traced down and one could write some control functions (for example error "\mathchar is not allowed in text mode")
What do you think? 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 Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------