On 01/02/2011 12:58 PM, Alexander Solovets wrote:
Exactly =) Just put "fricas" in .TeXmacs/plugins and two other scripts in "~".

Oh, not quite...

I had to execute the commands appearing at the top of the fricas shell script, namely

AXIOM='/home/hemmecke/software/lib/fricas/target/i686-pc-linux'
export AXIOM
PATH=${AXIOM}/bin:${PATH}
export PATH

otherwise the FriCAS menu item doesn't appear in the session menu of texmacs.

But you cannot require someone to set the AXIOM variable manually. So you better change fricas/progs/init-fricas.scm to something like this:

(plugin-configure fricas
  (:require (url-exists-in-path? "fricas"))
  ;(:initialize (fricas-initialize))
  (:launch "fricas -nosman")
  (:session "FriCAS"))

Calling "fricas -nosman" has the same effect as calling AXIOMsys with the AXIOM and PATH env variables set appropriately.

Second, you provided .axiom.input and texmacs.input. The standard init script for Fricas is ~/.fricas.input . So I've now created this file with content:

)set output algebra off
)set output texmacs on
)lisp (setf |$ioHook| (lambda (x &optional args) (cond ((eq x '|startPrompt|) (princ (concat (code-char 2) "prompt#") )) ((eq x '|endOfTeXmacsOutput|) (princ (concat (code-char 5) (code-char 10)))) ((eq x '|startTeXmacsOutput|) (princ (code-char 2))) ((eq x '|startKeyedMsg|) (princ (concat (code-char 2) "verbatim:"))) ((eq x '|endOfKeyedMsg|) (princ (code-char 5))) ((eq x '|endOfPrompt|) (princ (code-char 5) )) )))
)lisp (setf |$inputPromptType| '|plain|)

With the above modifications I can report to have a FriCAS running inside TeXmacs. Nice!

There are a few issues remaining, though.
1) Since you don't start the sman process, there is no graphics
   and no hyperdoc.
2) Globally changing ~/.fricas.input is not a good idea in my opinion.

As for 1) I have no idea why starting "fricas" instead of "fricas -nosman" does not work. Maybe, because sman is starting AXIOMsys and texmacs simply does not realize that sman is not giving back control.

For 2), I wish FriCAS had a way to run scripts specified on the command line, i.e. something like "fricas -read texmacs.input".

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to