On Wed, Jun 05, 2002 at 02:14:19PM +0200, geof wrote:
> > Things like that work (rudimentarily) already for Maple and Octave in
> > 1.2.0. 
> 
> Yes, but how it work? And what exactly can be done?

You write '1 + 2' in a math formula and type 'M-x math-extern maple
simplify' to get a '= 3' added. Alternately, you can mark the '1 + 2' and
it will get replaced by '3'. In general, 'M-x math-extern foo' will call
Maple's 'foo' function on the selected expressin.

> I'm interested to add mathematica support but I'd like have more
> information about what has been already done. I had a look at the files
> src/mathed/math_extern.[Ch] but as I don't know what I'm looking for, it
> doesn't realy help.

You basically have to add a function 'mathematicize' (or whatever) to every
math inset (or at least to the ones you are interested in) and there you
put code to transform the inset into Mma syntax. Usually you should be able
to copy the 'maplize' function and replace parantheses by square brackets
and things like that. Than you need to have a look add math_extern.C and
formulabase.C and hook calls to these new functions in. 

You need to call Mma in some kind of command line mode that produces
minimal output (either a result it LaTeX or an error message) and parse
this output. Just look at what the maple and octave backends do. It's not
exactly rocket science but quite a bit of work.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to