I am using latexmk and have the $out_dir set to ./build in my .latexmkrc configuration file. This is working as it should. But is there any way of having the generated PDF file put in the main directory with the .tex files?

I am currently using a Mac with MacTeX 2018 and pdfLaTeX. I believe that this version of pdfLaTeX does not support the aux-directory option.


There's no built-in way since the texlive software underlying MacTeX doesn't support the aux-directory option.

You could configure the command (e.g., pdflatex) that makes the pdf file so that it does its usual work first and then copies the pdf file to the main directory.

| improve this answer | |
  • Thank you, it looks like this is the only option at this point in time. LaTeXMK does have the $success_cmd and $failure_cmd but these only work in preview-continuous mode which I don;t always use. – mjb Aug 27 '18 at 11:10

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.