#269 — Jun 3, 2026 by Evan Chen
it took me five years but i think i finally found the right way to do
cd-supported Asymptote in latexmkrc:
use File::Basename;
sub run_asy {
my ($base, $dir) = fileparse($_[0]);
return system("cd '$dir' && asy -tex pdflatex '$base'");
}
i'd been misusing asy -o all this time (not supposed to be for directories!)
and nobody told me. sheesh.