reddit / emacs

File ".dvi" wasn't produced. Please Adjust 'dvipng' part of 'org-preview-latex-process-alist' (Doom Emacs, Mac Os Monterey)

thomasmyo · 2022-02-23 03:07
I'm new to Doom Emacs and I've been trying to get Latex equation preview working in emacs for a while now. When every I try to toggle latex preview with C-c C-x C-l it keeps giving me the error in the title. I went to check and tested in the Terminal: orgtexgvRQwY.dvi wasn't produced. but there was an orgtexgvRQwY.tex file Running Latex orgtexgvRQwY.tex creates a .dvi file of the same name Running dvipng ortexgvRQwY.dvi creates a .png file but with an extra \[1\] at the end. I've looked around forums but the other solutions doesn't seem to have worked. Another problem is for some reason on every startup, i always get this warning https://preview.redd.it/0calpoh91ij81.png?width=1442&format=png&auto=webp&s=b1dfa27797e9e3731c5d3706c1714d6923d6eab4 ​ This is my config on latex `(setenv "PATH" (concat "/Library/TeX/texbin" (getenv "PATH")))` `(setq exec-path (append '("/Library/TeX/texbin") exec-path))` `(setq org-preview-latex-default-process 'dvipng)` `(setq org-preview-latex-process-alist` `'((dvipng` `:programs ("latex" "dvipng")` `:description "dvi > png"` `:message "you need to install the programs: latex and dvipng."` `:image-input-type "dvi"` `:image-output-type "png"` `:image-size-adjust (1.0 . 1.0)` `:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")` `:image-converter ("dvipng -fg %F bg %B -D %D -T tight -o %O %f"))` `(dvisvgm` `:programs ("latex" "dvisvgm")` `:description "dvi > svg"` `:message "you need to install the programs: latex and dvisvgm."` `:use-xcolor t` `:image-input-type "dvi"` `:image-output-type "svg"` `:image-size-adjust (1.7 . 1.5)` `:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")` `:image-converter ("dvisvgm %f -n -b min -c %S -o %O"))` `(imagemagick` `:programs ("latex" "convert")` `:description "pdf > png"` `:message "you need to install the programs: latex and imagemagick."` `:use-xcolor t` `:image-input-type "pdf"` `:image-output-type "png"` `:image-size-adjust (1.0 . 1.0)` `:latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")` `:image-converter ("convert -density %D -trim -antialias %f -quality 100 %O")))`
lerobinbot · 2022-02-23 04:06
nice
xUN_Owen · 2022-03-01 00:21
Hey, i have the same problem about this, i started using doomemacs like 4 days ago. However if you find the way to fix i'm here, i read a thread on stack exchange that has a problem about dvi and the problem was about the symlink in the `usr/local/bin` of latex
thomasmyo · 2022-03-28 12:34
Hey sorry it's been over a month but I finally found I think a solution after digging around a lot more. So I checked the command output and noticed that zsh. in the Emacs terminal keeps saying that it can't find the Latex command I started looking around forums posts about commands not being recognized in doom emacs terminal and stumble upon this [post](https://stackoverflow.com/questions/3517165/pdflatex-command-not-working-in-emacs-terminal-mode) I added this code into my config.el and restarted and it works straight away now. Also I'm not sure if this affects the result but I gave Terminal and Emacs full disk access, so if this one doesn't work, try this step as well