[plt-scheme] In-line LaTeX in REPL
BTW, my code looks like this:
#lang scheme
(require scheme/system)
(require scheme/gui/base)
(define (latex str)
(let ([escaped-str (regexp-replace* #rx" " str "%20")])
(system (format "C:\\temp\\curl
\"http://www.codecogs.com/eq.latex?~a\" -o C:\\temp\\latex.gif"
escaped-str))
(make-object image-snip% "c:\\temp\\latex.gif")))
I keep the curl executable in my temp directory.
So you can do something like (latex "3 \\geq 2") and it will produce
the latex output for that.
While it's downloading the latex gif, the repl displays a read input
box. I'm not sure how to suppress that.