From: Leo B. <leo...@um...> - 2021-12-22 21:58:28
|
Eduardo Ochs <edu...@gm...> writes: >> Another (low-level) way to do this is to load emaxima.lisp and set >> dispaly2d to emaxima. >> >> (%i2) load("emaxima.lisp"); >> >> (%o2) "emaxima.lisp" >> (%i3) display2d:'emaxima; >> (%o3) \mathrm{emaxima} >> (%i4) integrate(x^2,x); >> (%o4) {{x^3}\over{3}} >> (%i5) diff(sin(x),x); >> (%o5) \cos x >> (%i6) diff(cos(x),x); >> (%o6) -\sin x >> >> It is pretty straightforward to convert that output into the >> maximasession data you get from using emaxima-mode. >> >> Leo > > > Thanks!!! > > A question on your first solution... I am using this to make sure > that an imaxima process is running and to switch to its buffer: > > (defun find-imaximaprocess (&rest rest) > (require 'imaxima) > (imaxima) > (find-ebuffer ;; this is similar to switch-to-buffer > (if imaxima-use-maxima-mode-flag > "*maxima*" > "*imaxima*"))) > > I took the > > (if imaxima-use-maxima-mode-flag "*maxima*" "*imaxima*") > > from the (cl-defun imaxima () ...). Is there a better way to find > the name of the imaxima buffer? ATM, no. I plan to change imaxima so that it can run in several buffers, but that keeps getting deferred... > > Btw, eev now supports imaxima (yay!), but it may be better to > rewrite the code above a bit... here are some details, for the > sake of completeness: > > http://angg.twu.net/eev-intros/find-eepitch-intro.html#2.3 > (find-eepitch-intro "2.3. `eepitch'") > > About your second solution: it was exactly what I needed! I was > able to convert its output by hand to the format that emaxima.sty > expects in just a minute. =) =) =) BTW, it should be easy enough to write a maxima function to emit exactly the output that you want (rather than editing it in emacs). Leo |