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
")"))))