forked from joaomlourenco/novathesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
latexmkrc
50 lines (46 loc) · 1.64 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
if ( ! $silent ) {
if ($^O =~ /darwin/) {
print "DIAGNOSTICS = Operating System Detected: Mac OSX\n";
$filesep = '/'
} elsif ($^O =~ /linux/) {
print "DIAGNOSTICS = Operating System: Linux\n";
$filesep = '/'
} else {
print "DIAGNOSTICS = Operating System: Windows\n";
$filesep = '\\'
}
}
add_cus_dep('glo', 'gls', 0, 'makeglo2gls');
add_cus_dep('acn', 'acr', 0, 'makeglo2gls');
add_cus_dep('slo', 'sls', 0, 'makeglo2gls');
add_cus_dep('cho', 'chs', 0, 'makeglo2gls');
sub makeglo2gls {
my ($base_name, $dir) = fileparse( $_[0] ); #handle -outdir param by splitting path and file, ...
if ( $silent ) {
if ($^O =~ /darwin/) {
system "makeglossaries -q -d '$dir' '$base_name'"; #unix
} elsif ($^O =~ /linux/) {
system "makeglossaries -q -d '$dir' '$base_name'"; #unix
} else {
system "makeglossaries", "-q", "-d", "$dir", "$base_name"; #windows
}
}
else {
system "echo '$dir' > /tmp/a";
system "echo '$base_name' >> /tmp/a";
if ($^O =~ /darwin/) {
system "makeglossaries -d '$dir' '$base_name'"; #unix
} elsif ($^O =~ /linux/) {
system "makeglossaries -d '$dir' '$base_name'"; #unix
} else {
system "makeglossaries", "-d", "$dir", "$base_name"; #windows
}
};
}
# sub makeglo2gls {
# system("makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo");
# }
push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'acn', 'acr', 'alg';
push @generated_exts, 'slo', 'sls', 'slg';
$clean_ext .= ' %R.ist %R.xdy';