On Tue, May 07, 2002 at 10:44:01AM +0200, geof wrote: > > Things like that work (rudimentarily) already for Maple and Octave in > > 1.2.0. > What can be done with these features?
Not much in fact. > And how to access it in lyx? Through the 'math-extern' LFUN. 'math-extern octave' simply pipes the contents of the cell the cursor is in through octave and appends a '= result' to the cell, or, if there is some highlighted stuff, replaces that stuff by the result. You can invoke this by calling the function from the minibuffer (by typing 'M-x math-extern octave') [And of course you can setup a key binding if you need this on a regular base] This way you can get access to some kind of simple calculator within LyX: Type 1+2 in a math box, issue 'M-x math-extern octave' and the cell will transform into '1+2=3'. 'math-extern maple' is slightly more sophisticated as it uses an extra argument and pushes the selected contents through the maple command of the same name. So 'math-extern maple simplify' e.g. would call Maple's 'simplify' function. To see this in action, open a math box, type \int x_a ^b dx, call 'math-extern maple simplify' to get '\int x_a ^b dx = 1/2 b^2 - 1/2 a^2'. Now you can select the right hand side of this equation, and call 'math-extern maple factor' to get '\int x_a ^b dx = 1/2 (b - a) (b + a)'. There are lots of things that do not work yet in this area, so do not expect too much... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
