forked from RoboCupAtHome/RuleBook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
latexmkrc
49 lines (40 loc) · 1.41 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
$pdf_previewer = "start okular";
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 ) {
my $return = system "makeglossaries -q '$base_name'";
}
else {
my $return = system "makeglossaries '$base_name'";
};
popd; # ... and cd-ing back again
return $return;
}
add_cus_dep('glo', 'gls', 0, 'run_makeind');
add_cus_dep('acn', 'acr', 0, 'run_makeind');
sub run_makeind {
my ($base_name, $path) = fileparse( $_[0] ); #handle -outdir param by splitting path and file, ...
pushd $path; # ... cd-ing into folder first, then running makeglossaries ...
my $dest = $$Pdest;
if ( $silent ) {
my $return = system "makeindex -q -o \"$dest\" '$base_name'";
}
else {
my $return = system "makeindex -o \"$dest\" '$base_name'";
};
popd; # ... and cd-ing back again
return $return;
}
# Compile the nomenclature (package 'nomencl')
add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
sub makenlo2nls {
my ($base_name, $path) = fileparse( $_[0] );
pushd $path;
my $dest = $$Pdest;
system( "makeindex -s nomencl.ist -o \"$dest\" \"$base_name\"" );
popd;
return $return;
}