Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

After getting to know org mode here, I tried it out. It seems to be, indeed, very helpful. However, I want it to work smoothly with LaTeX, and as a compiling script I want to use latexmk.

I followed the instruction here trying to make org-mode use latexmk as the compiling engine/script. Unfortunately, this doesn't work for me. The resulting .tex file is perfect and I can manually compile it using latexmk, but it won't work directly.

share|improve this question
@Dror: "After getting to know org mode here" , could you add a link please. I don't know it and like to getting to know it as well. – Martin Scharrer Feb 8 '11 at 9:05
@Martin: I added a link. By "here" I meant in this/our community :) – Dror Feb 8 '11 at 9:10
@Dror: I thought so but couldn't find it first here on Just a tip: you might call it "Emacs org-mode" in the title and the text to make it more clear. – Martin Scharrer Feb 8 '11 at 9:21
There's not really enough information here to help. Maybe Emacs can't find the latexmk binary? Check the value of the load-path Emacs variable. If not, can you see if any external processes are invoked by emacs? – Charles Stewart Feb 8 '11 at 12:56
When you compile your document in org-mode with "C-c C-e d", Emacs/org-mode should create a buffer in the background called "Org PDF LaTeX Output". This is a log of the compilation process. You should be able to switch to it using C-x b (or just see if it's there in the "Buffers" menu on the menubar). Can you see any error messages in there about where latexmk or some other aspect of the compile process is failing? – Kieran Feb 8 '11 at 19:24

2 Answers 2

up vote 7 down vote accepted

The org-mode mailing list was useful! I added (setq org-latex-to-pdf-process (list "latexmk -f -pdf %s")) to my .emacs file and then C-c C-e d worked as expected, producing the PDF using latexmk.

share|improve this answer
I had to use "%f" instead of "%s" but thanks for the solution! – Shitikanth Feb 26 '13 at 22:23

In Org mode 8, the variable is renamed. As Shitikanth commented, I needed %f, so in org 8:

(setq org-latex-pdf-process (list "latexmk -f -pdf %f"))

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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