On Mon, Mar 24, 2003 at 02:17:00AM -0800, Serge Winitzki wrote: > Thank you, I looked at that file. It seems that after > all it *is* possible to put a script into > ~/.lyx/mathed/extern_XYZ and then the command > "math-extern XYZ simplify" will call that script and > expect some answer. No changes in C++ code.
Oops... looks like I already forgot about that... > Of course, the format of input/output is not > documented and it's a problem. It's something like [sqrt [frac 1 2] ] But it is rather fragile... This was just meant as a debugging aid, not as the "real thing". > I tried a few equations from my LyX documents to get a feel of what gets > passed to that script. Seems not hard to parse at first glance. I'd guess there are still a few rough corners as this part is not very well maintained. I'd be happy to accept bug reports of suggestions for improvement. > There is one problem however: when a LyX expression > contains an apostrophe character ' then this breaks > the shell escape that runs things like Like this one. What do you suggest: How should the ' be exported? > So it would be nice to get a hold of a specification > of this MathArray export format. I'm surprised that > you don't have external scripts for maple, maxima, > etc. and process it inside C++ instead. It turned out that a conversion by an external script basically needs to re-build the internal stucture, so as a quick&dirty "solution" we have hardwired exports for the "supported" systems. In the long run I'd like to replace them with a single export format (probably MathML) and trust the CAS's import of MathML to do the right thing. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)