On Thu, Oct 18, 2001 at 01:20:18PM +0200, Andre Poenitz wrote: > On Thu, Oct 18, 2001 at 12:17:06PM +0100, Jose Abilio Oliveira Matos wrote: > > Amir or John Weiss should have a better answer. I never worked with this > > part of the code, but I think that I have a basic grasp of what is going on.
On the other hand, I haven't worked on it in three years. > > Reading the comments in source code, it looks like the latex code is > > "cleaned" in CleanTex.pm, where, for example, x^2 => x_{2}, since the mathed > > parser is more strict than latex. Pretty much. > x^2 is fine in current mathed, and so is '$...$', '$$...$$' and '\cal'. > > > After that stage all the latex math code is passed untouched to mathed. > > Would be nice if all math remains untouched by reLyX... It's great that you've done a lot of work to support the stuff lyx didn't used to support which required writing these workarounds in the first place. It seems like some of CleanTeX.pm could probably go away at this point. I do think the math translation stuff in syntax.default needs to stay in, because lots of people use non-"standard" math in their files, and this might allow them to translate it. Btw, the only problem with not translating $..$ and stuff is that the parser at some point does need to make sure it knows where math begins and ends. (Btw, there are probably other commands that automatically start math mode text. Would be nice to handle those, sending them all to whatever that function is that just copies exactly literally. As long as we're at it, what's the current support for \mbox? I had this fantasy of finding \mbox'es in math and translating them into regular LyX....) -Amir