$out_dir = 'build'; $pdflatex = 'pdflatex -synctex=1 -interaction=nonstopmode -shell-escape --output-directory=$out_dir %O %S'; $pdf_mode = 1; $clean_ext = 'acn acr alg aux bbl blg fdb_latexmk fls glg glo gls idx ilg ind lof log lot out toc xdy'; $latexmk_postprocess = sub { system("cp $out_dir/*.pdf ."); };