Enrico Forestieri wrote: > On Mon, Nov 06, 2006 at 12:17:53PM +0100, Jean-Marc Lasgouttes wrote: > >> Would it be a big problem (esthetics aside) to always leave the braces >> alone? I do not like behaviour that is not predictable.
No, it would not be a problem. The only drawback are the visible braces on screen in {a'}^2. I would actually prefer that, because it is really safe, but I tried to work around the problem because I did not want to destroy your fix. Does that mean that it is OK for you to restore the old 1.3.x code (and adding a comment why the current one does not work)? > I beg your pardon, but what's wrong with writing {\xxx{aa}}^2 > if you want to preserve the braces? See attached file. The fact that old files that previously worked did not work anymore. And the fact that LyX will eat the other braces if you read the file, and then the inner ones if you save it and read it again. This will also create undo/redo problems, since undo/redo in math goes through the text representation. > This is a problem with semantics. IMO, \xxx{aa}^2 defines aa as the > nucleus, whereas {\xxx{aa}}^2 explicitly says that \xxx{aa} is the > nucleus. The fact that \xxx{aa}^2 works in TeX is unfortunate. Fact is that it does work in TeX, so it must work in LyX. One can argue whether it is a good idea to use TeX syntax for math in LyX files (and I think if I had to redesign mathed from scratch I would not use it), but since it is used we have to support a reasonable subset of TeX. The cat code games for example are IMHO not "a reasonable subset of TeX". This is advanced stuff, but using self defined commands is quite common. LyX can never know them. Now you can say that I should use a math macro instead, but math macros are so horribly broken that I prefer to define the commands in a common preamble.tex that is used by several documents. Georg