[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Interpreter commands from Spad?
From: |
Bill Page |
Subject: |
Re: [Axiom-developer] Interpreter commands from Spad? |
Date: |
Wed, 29 Aug 2007 13:01:59 -0400 |
Arthur,
If you are interested in the LaTeX output from the Axiom interpreter
you will need to re-direct a different stream. I.e. $texOutputStream
instead of $algebraOutputStream. For example:
(1) -> )set message autoload off
(1) -> )set output tex on
(1) -> )lisp (progn (setq tmpout (make-string-output-stream)) (setq save |$texOu
tputStream|) (setq |$texOutputStream| tmpout) (|parseAndInterpret| "(x+1)^9") (s
etq |result| (get-output-stream-string |$texOutputStream|)) (setq |$texOutputStr
eam| save))
9 8 7 6 5 4 3 2
(1) x + 9x + 36x + 84x + 126x + 126x + 84x + 36x + 9x + 1
Type: Polynomial Integer
Value = #<synonym stream to *TERMINAL-IO*>
(2) -> )set output tex off
(2) -> string(result$Lisp)
(2)
"$$
{x \sp 9}+{9 \ {x \sp 8}}+{{36} \ {x \sp 7}}+{{84} \ {x \sp 6}}+{{126}
\
{x \sp 5}}+{{126} \ {x \sp 4}}+{{84} \ {x \sp 3}}+{{36} \ {x \sp 2}}+
{9 \
x}+1
\leqno(1)
$$
"
Type: String
(3) ->
---------
You should be able to use (2) above in a Spad program.
Regards,
Bill Page.
On 8/29/07, Arthur Ralfs <address@hidden> wrote:
> Thanks for the suggestions from Bill and Martin.
> I hope to have some time to look at this problem
> later today.
>
> Arthur
>