mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5264 from tk0miya/mendex_for_windows
latex: Invoke mendex from perl (for Windows)
This commit is contained in:
commit
bce956d357
@ -1,6 +1,23 @@
|
||||
$latex = 'platex ' . $ENV{'LATEXOPTS'} . ' -kanji=utf8 %O %S';
|
||||
$dvipdf = 'dvipdfmx %O -o %D %S';
|
||||
$makeindex = 'rm -f %D; mendex -U -f -d %B.dic -s python.ist %S || echo "mendex exited with error code $? (ignoring)" && : >> %D';
|
||||
$makeindex = 'internal mendex %S %B %D';
|
||||
sub mendex {
|
||||
my ($source, $basename, $destination) = @_;
|
||||
my $dictfile = $basename . ".dic";
|
||||
unlink($destination);
|
||||
if (-f $dictfile) {
|
||||
system("mendex", "-U", "-f", "-d", $dictfile, "-s", "python.ist", $source);
|
||||
if ($? > 0) {
|
||||
print("mendex exited with error code $? (ignored)\n");
|
||||
}
|
||||
}
|
||||
if (!-e $destination) {
|
||||
# create an empty .ind file if nothing
|
||||
open(FH, ">" . $destination);
|
||||
close(FH);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||
sub makeglo {
|
||||
return system( "mendex -J -f -s gglo.ist -o '$_[0].gls' '$_[0].glo'" );
|
||||
|
Loading…
Reference in New Issue
Block a user