Skip to content

Instantly share code, notes, and snippets.

@hannes-brt
Created November 26, 2010 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannes-brt/717163 to your computer and use it in GitHub Desktop.
Save hannes-brt/717163 to your computer and use it in GitHub Desktop.
Turns a math expression in Latex-format into a png to be used in a markdown document
;; Turn region into Latex-picture
(defun latex-picture (start end)
(interactive "r")
(let ((hex-string (url-hexify-string
(filter-buffer-substring start end))))
(delete-region start end)
(insert (concat "![](http://www.sitmo.com/gg/latex/latex2png.2.php?z=100&eq="
hex-string
")"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment