TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 tex.sx. 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
Sorry this isn't as a comment, but I don't have the rep! You might be better off asking on the org-mode users mailing list [here][1]. They are generally pretty quick to respond with useful information. [1]: lists.gnu.org/mailman/listinfo/emacs-orgmode "here" – cm2 Feb 8 '11 at 16:58
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
up vote 8 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.