Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

up vote 0 down vote accepted

This had to do with my options set in Emacs.

(defun run-latexmk ()
  (interactive)
  (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)
                 master-file))
    (if (plist-get TeX-error-report-switches (intern master-file))
        (TeX-next-error t)
      (progn
        (demolish-tex-help)
        (minibuffer-message "latexmk: done."))))

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

share|improve this answer

Your Answer

 
discard

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.