On Fri, Sep 16, 2016 at 12:33:08AM +0100, Guillaume Munch wrote: > Le 15/09/2016 à 23:52, Enrico Forestieri a écrit : > >On Thu, Sep 15, 2016 at 01:41:30PM +0100, Guillaume Munch wrote: > >> > >>Now same problem with the attached. I get $\mbox{\ensuremath{\comp}\comp}$ > >>instead of $\mbox{\ensuremath{\comp\comp}}$. > >> > >>Also, I was surprised to see that when I enter \textit,\mbox,... it gets > >>wrapped inside a \text environment. > > > >Both issues should be solved now. > > > > Yes, I confirm. Thank you. > > In practice I find that one has to change one's habits when writing text > in math. The new behaviour seems consistent and understandable though.
I simply hate it ;-) > I am wondering though, as I thought that the original patch was only > supposed to change what happens when one inserts a macro: how come does > the code to output to latex had to change? Did I miss something about > the effect of the patch? There are two different series of patches. The one from #9742 simply adjusts things on export. The other one implements the desiderata from Günter so that proper real insets are inserted to assure the correct mode. These are orthogonal to each other. For example, if you insert a textmode macro in mathmode, it is wrapped in a real \text inset. But if you dissolve the \text inset, it will be automatically reinserted at export time. In this way, even if you dissolve the real inset you don't get errors when compiling. Both series of patches can be reverted independently from each other, as they do not interact. I really hate the automatic insertion of real insets because they are not practical from my point of view. They make hard navigation and selection. For example, if you type "\int a" in an \mbox, you now get "\mbox{\ensuremath{\int a}}", but if you dissolve \ensuremath, you get "\mbox{\ensuremath{\int}a}" at export time. This is what I think should be the case, as if I type \int in textmode I only want an integral sign in the middle of text. Instead, now I have to remember to move out of \ensuremath in order to obtain a textmode "a" (or remember to dissolve the now real \ensuremath). -- Enrico