I just discovered a bug in fricas.el (probably in fricas-insert-TeX).
Here are the steps to reproduce it:
(1) -> )se ou tex on
(1) -> integrate(exp(-x^2/2), x)
(2) -> 1
(3) -> integrate(exp(-x^2/2), x)
The TeX output of the first integrate(exp(-x^2/2), x) shows a blank box
only (probably because \erf is not known to LaTeX).
The TeX output of the second integrate(exp(-x^2/2), x) shows something
like
(2) 1
i.e., it is using the image from the previous expression...
I guess
(defun fricas-insert-TeX ()
(let* ((pos (point))
(bas (file-name-sans-extension fricas-TeX-file))
(dir (file-name-directory fricas-TeX-file))
(png (make-temp-file "fricas" nil ".png"))
(dvi (concat bas ".dvi"))
(bg (apply 'format
"rgb %f %f %f"
(mapcar (function (lambda (v) (/ v 65535.0)))
(color-values
(face-background
'fricas-TeX)))))
(inhibit-read-only t))
(write-region (concat fricas-TeX-preamble
fricas-TeX-buffer
fricas-TeX-postamble)
nil fricas-TeX-file)
;; TeX the file
(call-process "latex" nil nil nil (concat "-output-directory=" dir)
fricas-TeX-file)
;; png the output
(call-process "dvipng" nil nil nil "-bg" bg "-o" png dvi)
;; create and insert the image
(insert-image (create-image png 'png nil) fricas-TeX-buffer)
(fricas-set-properties pos (point) 'fricas-TeX)
(fricas-insert-ascii "\n" 'fricas-undefined)
(setq fricas-TeX-buffer "")))
--
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.