I'm trying to get latexmk to compile a .tex file with external \include{...}
references to a specific build
directory so I don't pollute my directory tree with .aux
files, etc.
However, it appears latexmk
doesn't do as I'd expect when it compiles the included files. For example, consider a file file1.tex
which has something like
%%%%%
\include{chapters/test}
%%%%%
When I run
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode -file-line-error" file1.tex
everything works fine, but
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode -file-line-error" -outdir=build file1.tex
gives me the error
Latexmk: Missing input file: 'chapters/test.aux' from line
'No file chapters/test.aux.'
If I don't have the \include
statement, using \input
instead, everything compiles nicely to the build directory as you would expect.
For reference, I'm working on Mac OSX w/ MacTeX, as I understand there are a few differences in the implementation of latexmk
between MacTeX and MikeTeX... any help would be much appreciated, as I've been beating my head against this for a while now.
.tex
extension when using\include
just use\include{chapters/test}
\include{chapters/test}
as you suggest! I updated the question accordingly :)