Is it possible to put (aux log out toc bbl bib blg) files in another directory with latexmk?
Asked
Active
Viewed 5,393 times
8
-
related question: http://tex.stackexchange.com/questions/30350/use-miktex-option-through-latexmk – doncherry Nov 19 '12 at 06:42
-
1Jonas' solution, which is based on a more current version of latexmk, seems superior to me; I suggest changing the accepted answer. – doncherry Nov 19 '12 at 06:47
-
@doncherry: Done, but it doesn't yet work with my MacTex installation unfortunately. – Neil G Nov 19 '12 at 14:51
2 Answers
10
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=FOOSets 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.
Jonas Stein
- 8,909
-
Which versions of
latexmkhave this feature? I'm on 4.24, and it doesn't seem to exist... – dinosaur Mar 30 '16 at 01:15 -
@dinosaur V. 4.24 was released in May 2011, the auxdir was introduced in 2013. – Jonas Stein Aug 03 '17 at 17:49
-
3
I suppose that latexmk also can handle the option output-directory=...
-
1
-
I got output-directory working by changing the way latexmk calls pdflatex – Neil G Dec 25 '10 at 07:34
-
no, all output is affected. I always put a link from my doc directory to the pdf in the outpunt directory. – Dec 25 '10 at 07:51
-
-
I think that you might have to use
-jobnamewith recent versions oflatexmk. (My version does not seem to support the output-directory option.) – mforbes Oct 06 '11 at 18:33 -
-
@mforbes Current versions do support
output-directoryas well asaux-directory. – doncherry Nov 19 '12 at 06:46 -
@Herbert See http://meta.tex.stackexchange.com/questions/2407/official-capitalizations-of-words-from-the-tex-world – doncherry Nov 19 '12 at 07:25