Is it possible to put (aux log out toc bbl bib blg) files in another directory with latexmk?
-
related question: tex.stackexchange.com/questions/30350/…– doncherryCommented Nov 19, 2012 at 6:42
-
1Jonas' solution, which is based on a more current version of latexmk, seems superior to me; I suggest changing the accepted answer.– doncherryCommented Nov 19, 2012 at 6:47
-
@doncherry: Done, but it doesn't yet work with my MacTex installation unfortunately.– Neil GCommented Nov 19, 2012 at 14:51
Add a comment
|
2 Answers
auxdir
is the directory for all auxiliary files but not the PDF file.
latexmk -auxdir=/tmp test.tex
should work. You can extend this to autocompile with latexmk -auxdir=/tmp -pdf -pvc test.tex
The manual man latexmk
/ texdoc latexmk
explains more about the auxdir
parameter:
-auxdir=FOO or -aux-directory=FOO Sets the directory for auxiliary output files of (pdf)latex (.aux, .log etc). This achieves its effect by the -aux-direc‐ tory option of (pdf)latex, which currently is only implemented on the MiKTeX version of (pdf)latex. See also the -outdir/-output-directory options, and the $aux_dir, $out_dir, and $search_path_separator configuration variables of latexmk. In particular, see the documentation of $out_dir for some complications on what directory names are suitable.
The auxdir parameter was introduced in version 4.39.
-
Which versions of
latexmk
have this feature? I'm on 4.24, and it doesn't seem to exist...– dinosaurCommented Mar 30, 2016 at 1:15 -
@dinosaur V. 4.24 was released in May 2011, the auxdir was introduced in 2013. Commented Aug 3, 2017 at 17:49
-
I suppose that latexmk
also can handle the option output-directory=...
-
1can I keep the pdf file in the same directory, or is that too hard?– Neil GCommented Dec 25, 2010 at 7:00
-
I got output-directory working by changing the way latexmk calls pdflatex– Neil GCommented Dec 25, 2010 at 7:34
-
no, all output is affected. I always put a link from my doc directory to the pdf in the outpunt directory.– user2478Commented Dec 25, 2010 at 7:51
-
-
I think that you might have to use
-jobname
with recent versions oflatexmk
. (My version does not seem to support the output-directory option.)– mforbesCommented Oct 6, 2011 at 18:33