emax smaple

This commit is contained in:
tavo-wasd 2024-06-22 00:54:56 -06:00
parent 1befd2f3ef
commit f1033c3ea6
3 changed files with 15 additions and 1 deletions

View file

@ -5,7 +5,7 @@ out="${file%.tex}.png"
makepng() { makepng() {
latex -interaction nonstopmode "$file" >/dev/null 2>&1 || return 1 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 makepng && echo "$out" || exit 1

14
public/texpngweb.el Normal file
View file

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