The following line in my org file is causing problems
#+LaTeX_HEADER: \usepackage{prooftrees}
If this line is there, then org latex preview produces an empty box. If I remove it, things work just fine.
The output of *Org Preview LaTeX Output* is:
This is dvipng 1.17 Copyright 2002-2015, 2019 Jan-Ake Larsson
[1]
so I can't tell what's going wrong. Finally, the *Messages* buffer only says: "Creating image...done", which doesn't help me understand why it's failing.
I know that the prooftrees package works, because I can get it to work in my normal latex compilation, so this seems to be a problems specifically with emacs org-mode.
How can I troubleshoot this issue? How can I see what latex it's generating and what commands it's running to produce the image?
Thanks
Edit: The issue was with dvipng: this program would output a messed up png after processing the output dvi file. I tried changing to imagemagick but got a mysterious error. Changing to dvisvgm fixed the issue, so I guess this program is somehow better at processing dvi files that contain prooftrees.
To change to dvisvgm I did
- M-x customize-variable ENTER org-preview-latex-default-process
- then changed the value to "dvisvgm"
To catch the temporary tex files before emacs deleted them I used the following shell command in the /tmp directory:
inotifywait -mr --format '%w%f' -e create . | while read file; do if echo "$file" | grep '^./orgtex.*\.tex$' > /dev/null; then echo "file: $file"; cp $file ${file}.bkp; fi; done