I'm trying to do the same thing as described in (Export an org-mode file as a PDF via command line?) generate a pdf from a org file but want to do it inside a docker container also. And now I get an error and no pdf. How do I display the content of the "Org PDF LaTeX Output"

The command I'm currently using is as follows:

docker run \
   -it \
   --rm \
   -v `pwd`:/docs \
   --entrypoint emacs \
   hgjt/emacs-texlive:latest \
   -l /root/emacs.el \
   --visit plot_var.org \
   --batch \
   --eval "(org-latex-export-to-pdf)"

1 Answer 1


As a sanity check, are you sure you have a tex distribution installed correctly? Maybe you can interactively load into your docker to test it out.

Here is a command which will dump the error log to a file named Org-PDF-LaTeX-Output.err:

emacs --visit plot_var.org --batch --eval "(progn (ignore-errors (org-latex-export-to-pdf))(set-buffer \"*Org PDF LaTeX Output*\")(write-file \"Org-PDF-LaTeX-Output.err\"))"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.