diff --git a/index.php b/public/index.php similarity index 100% rename from index.php rename to public/index.php diff --git a/tex2png.sh b/public/tex2png.sh similarity index 77% rename from tex2png.sh rename to public/tex2png.sh index b5c732d..554f09c 100755 --- a/tex2png.sh +++ b/public/tex2png.sh @@ -5,7 +5,7 @@ out="${file%.tex}.png" makepng() { latex -interaction nonstopmode "$file" >/dev/null 2>&1 || return 1 - dvipng -D 200 -T tight -bg Transparent -o "$out" "${file%.tex}.dvi" >/dev/null 2>&1 || return 1 + dvipng -D 150 -T tight -bg Transparent -o "$out" "${file%.tex}.dvi" >/dev/null 2>&1 || return 1 } makepng && echo "$out" || exit 1 diff --git a/public/texpngweb.el b/public/texpngweb.el new file mode 100644 index 0000000..96c01a8 --- /dev/null +++ b/public/texpngweb.el @@ -0,0 +1,14 @@ +;; Sample emacs configuration for this setup + +(setq org-preview-latex-process-alist + '((texpngweb + :programs ("curl") + :description "tex > png" + :message "you need to install curl." + :image-input-type "tex" + :image-output-type "png" + :image-size-adjust (1.0 . 1.0) + :latex-compiler ("curl -F \"file=@%f\" http://0.0.0.0:8000") + :image-converter ("curl http://0.0.0.0:8000/tmp.png -o %O")))) + +(setq org-latex-create-formula-image-program 'texpngweb)