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

I use Emacs and MikTeX. With the latter comes a PDFLaTeX option to move clutter in a temp-dir directory: -aux-directory temp-dir. I am tentatively trying to pass it to AUCTeX with:

(setq tex-start-options "-aux-directory temp-dir")

Doesn’t work! I am not very knowledgeable with AUCTeX internals. Can you give some hints and examples on LaTeX-command, latex-run-command, tex-start-options and tex-start-commands and the likes?

share|improve this question
You can use latexmk with AUCTeX and pass the pdflatex option via the .latexmkrc file. – N.N. Jan 22 '13 at 17:56
@N.N. Can you tell me what are the benefits of using Latexmk over simple Emacs/AUCTeX? Isn’t AUCTeX already an interface between Emacs and the LaTeX binaries? Isn’t it possible to do in Elisp what Latexmk does in perl? – antonio Jan 22 '13 at 20:01
AUCTeX is such an interface and I have not that much experience with it as I have used latexmk via it instead, so I can't really say. latexmk works well (compiles as many times as needed for everything to be done) and it easy to configure. – N.N. Jan 22 '13 at 20:56
I don't know any -aux-directory option for pdflatex, however you can set additional options to pdflatex customizing LaTeX-command variable: M-x add-file-local-variable RET LaTeX-command RET and set its value to "latex -aux-directory temp-dir" with "" quotes and without pdf before latex, it'll be automatically prefixed if TeX-PDF-mode is on. – giordano Jun 2 '13 at 12:59

Your Answer


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

Browse other questions tagged or ask your own question.