On Fri, Sep 18, 2015 at 12:30:36AM +0200, Enrico Forestieri wrote: > > Please note that the patch you propose is not changing anything. > You simply force the use of unicode symbols through the math panels. > However, if a user directly inputs \AA this is now displayed in red, > even if it is entered in a text mode environment. One has to save > and reload the file to actually see that symbol. Moreover, note > that saving and reloading also solves the problem occurring without > your patch that those symbols are enclosed in \ensuremath [1]. Try it.
I forgot to explain why this is so. When a file is loaded, the replacements in lib/unicodesymbols are applied. Thus, if one enters \AA in a textmode environment, when the file is reloaded it gets replaced by Å which is not a MathMacro and thus is not enclosed in \ensuremath. But, if \AA is entered in a math mode environment, no replacement takes place. It would stay in red with Günter's patch and would cause latex errors. Instead, with the patch I propose the macro is diplayed as Å and enclosed in a text mode environment, thus avoiding compile errors. -- Enrico