Compiling using latexmk from a different directory?
As was already mentioned in a comment, the -cd
option to latexmk does exactly what you request
latexmk -pdf -cd subfolder/subfolder/main.tex
As was already mentioned in a comment, the -cd
option to latexmk does exactly what you request
latexmk -pdf -cd subfolder/subfolder/main.tex