Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating 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

I have latexmk setup to run through Auctex.

I hit crtl + c crtl + c and the option latexmk is present. When I run a file that has new bibliography items, it says after compiling that I need to run latexmk again to fix the dependencies.

Why isn't it running twice automatically? Isn't that what it is supposed to do?

share|improve this question
up vote 0 down vote accepted

This had to do with my options set in Emacs.

(defun run-latexmk ()
  (let ((TeX-save-query nil)
        (TeX-process-asynchronous nil)
        (master-file (TeX-master-file)))
    (TeX-save-document "")
    (TeX-run-TeX "latexmk"
                 (TeX-command-expand "latexmk -pdflatex='pdflatex -file-line-error 
                                   -synctex=1' -pdf %O %S" 'TeX-master-file)
    (if (plist-get TeX-error-report-switches (intern master-file))
        (TeX-next-error t)
        (minibuffer-message "latexmk: done."))))

Original I had %o %s. It has to be capital O and S.

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.