dotfiles/latex/.latexmkrc

26 lines
891 B
Plaintext
Raw Normal View History

2023-09-07 17:08:06 +01:00
$pdflatex = 'xelatex --shell-escape -synctex=1 %O %S';
# https://tex.stackexchange.com/questions/1226/how-to-make-latexmk-use-makeglossaries
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
sub run_makeglossaries {
my ($base_name, $path) = fileparse( $_[0] ); #handle -outdir param by splitting path and file, ...
pushd $path; # ... cd-ing into folder first, then running makeglossaries ...
if ( $silent ) {
system "makeglossaries -q '$base_name'"; #unix
# system "makeglossaries", "-q", "$base_name"; #windows
}
else {
system "makeglossaries '$base_name'"; #unix
# system "makeglossaries", "$base_name"; #windows
};
popd; # ... and cd-ing back again
}
push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'acn', 'acr', 'alg';
$clean_ext .= ' %R.ist %R.xdy';