-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlatexmkrc
25 lines (21 loc) · 866 Bytes
/
latexmkrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# add acronym and glossary compilation to latexmk
# https://tex.stackexchange.com/a/44316/260462
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
}
# cleanup aux files
push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'acn', 'acr', 'alg';
$clean_ext .= ' %R.ist %R.xdy';