$pdflatex = "xelatex -shell-escape";
$pdf_mode = "1";

push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'syg', 'syi', 'slg';
push @generated_exts, 'acn', 'acr', 'alg';
$clean_ext .= ' %R.bbl %R-blx.bib %R.ist %R.nav %R.run.xml %R.snm %R.xdy %R.pyg';

add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
add_cus_dep( 'syg', 'syi', 0, 'makeglossaries' );
sub makeglossaries {
    system( "makeglossaries \"$_[0]\"" );
}
