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.

  • @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
  • 1
    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
  • 2
    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

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

Note if org-mode-version > 8.0 org-latex-to-pdf-process has been renamed to org-latex-pdf-process

  • 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"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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