[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Maxima inline plots

From: Marduk Bolaños
Subject: [Texmacs-dev] Maxima inline plots
Date: Tue, 05 Sep 2017 02:16:47 +0000
User-agent: astroid/v0.9.1-10-gfea7a92d (https://github.com/astroidmail/astroid)

Dear all,

I implemented in Lisp what Python and Gnuplot do in order to display a
plot inline in TeXmacs:

(defun tm_out (str)
 (let ((beg (string (code-char 2)))
        (end (string (code-char 5))))
(concatenate 'string beg "ps: " str end)))

(defmfun $ps_out (filename)
 (with-open-file (stream filename)
                  (let ((contents (make-string (file-length stream))))

                    (read-sequence contents stream)
                    ;; princ does not enclose the string in quotes
                    (princ (tm_out contents))
                    (princ "")

This works great inside a Maxima session, but I would also like to use
it in an executable Maxima fold (script).

I have tried a million things and the script output is always
empty. How can I get it done?

Thanks in advance!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]