-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.latexmkrc
37 lines (31 loc) · 908 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
26
27
28
29
30
31
32
33
34
35
36
37
our %externalflag = ();
$pdflatex = 'internal mypdflatex %O %S %B';
sub mypdflatex {
our %externalflag;
my $n = scalar(@_);
my @args = @_[0 .. $n - 2];
my $base = $_[$n - 1];
system 'lualatex', @args;
if ($? != 0) {
return $?
}
if ( !defined $externalflag->{$base} && -e "$base.makefile" ) {
$externalflag->{$base} = 1;
system ("$make -j5 -f $base.makefile");
}
return $?;
}
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
sub run_makeglossaries {
if ( $silent ) {
system "makeglossaries -q '$_[0]'";
}
else {
system "makeglossaries '$_[0]'";
};
}
push @generated_exts, 'glo', 'gls', 'glg', 'sbl', 'slg', 'sym', 'bbl';
push @generated_exts, 'acn', 'acr', 'alg';
push @generated_exts, 'makefile', 'figlist', 'auxlock';
$clean_ext .= ' %R.ist %R.xdy';