$pdf_mode = 1;
$pdf_previewer = 'start evince';

@default_files = ('research.tex');

# Make latexmk -c remove .bbl file
$bibtex_use = 2;

# Make the glossaries package happy
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]);
    system("makeglossaries '$base_name'");
}

push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'acn', 'acr', 'alg';
$clean_ext .= ' %R.ist %R.xdy';
