Last active
March 1, 2022 01:53
-
-
Save zhaofeng-shu33/993a9c34ca8f0647ad298a06e55694ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_cus_dep('glo', 'gls', 0, 'makeglo2gls'); | |
add_cus_dep('acn', 'acr', 0, 'makeglo2gls'); | |
add_cus_dep('ntn', 'not', 0, 'makeglo2gls'); | |
add_cus_dep('nlo', 'nls', 0, 'make_nomencl'); | |
sub make_nomencl { | |
my ($base_name, $path) = fileparse( $_[0] ); | |
pushd $path; | |
system "makeindex", "$base_name.nlo", "-s", "nomencl.ist", "-o", "$base_name.nls"; | |
popd; | |
} | |
sub makeglo2gls { | |
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment