On Friday, 12 September 2014 16:26:07 UTC+2, Bill Page wrote: > > Kurt, > > Could you send an example of your use of gnuDraw in TeXmacs? Perhaps > we could encourage Waldek to include the gnuDraw code in the new > release. > > Maybe we could somehow embed your tmcmd into the TeXmacs FriCAS interface. > > Bill. > > > I'm afraid it would be slightly premature as the sample Pdf shows ;) I have to figure out the missing options to place the image in a reasonable way (e.g. insert text-field or figure environment). The goal is to send high quality postscript to TeXmacs (using tm's ps command), ideally without using intermediate files or inserting images. I'm quite confident that this is possible (... maybe for the next release :) BTW while writing a serializer à la http://www.texmacs.org/joris/semedit/semedit.html I collected a lot of internal (mostly undocumented) scheme commands which permit controlling TM in almost every aspect with tmcmd. The code below, for instance, sends any mathematical input as function tmm("math_input") to Fricas. It seems easier to me to parse and interpret the input by Fricas than by scheme procedures (e.g. fircas-input.scm). If one defines tmm(s:String):String == s, one can see how TM serializes by default. E.g. entering in math-mode \int_a^b f(x) dx sends "int(a,b,f(x)dx)" which is easily transformed to the corresponding Fricas command. To be short, this way I got a pile of TM related functions which may be useful to the plugin. However, everything has yet to be thouroughly tested and polished before inclusion.
(define (fricas-verbatim-serialize lan t)
(import-from (utils plugins plugin-cmd))
(with u (pre-serialize lan t)
(string-append "tmm(\"" (escape-verbatim (texmacs->code u)) "\")\n")))
(define (fricas-serialize lan t)
(import-from (utils plugins plugin-cmd))
(import-from (utils plugins plugin-convert))
(with s (if (in-math?)
(fricas-verbatim-serialize lan t)
(verbatim-serialize lan t))
s))
(plugin-configure fricas
(:require #t)
(:initialize (fricas-initialize))
(:launch "fricas --texmacs")
(:session "Fricas")
(:serializer ,fricas-serialize)
;(:commander ,fricas-command)
(:tab-completion #t)
(:scripts "Fricas"))
Kurt
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
gnudraw_sample.pdf
Description: Adobe PDF document
