Merge pull request #5263 from tk0miya/create_empty_ind_file_by_perl

latex: Create an empty .ind file by perl (for Windows)
This commit is contained in:
Takeshi KOMIYA 2018-08-08 17:18:30 +09:00 committed by GitHub
commit 25f6563168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,18 @@ $pdflatex = 'xelatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
$lualatex = 'lualatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
$xelatex = 'xelatex --no-pdf ' . $ENV{'LATEXOPTS'} . ' %O %S';
{% if xindy_use -%}
$makeindex = '[ ! -s %S ] && : > %D || xindy ' . $ENV{'XINDYOPTS'} . ' %O -o %D %S';
$makeindex = 'internal xindy ' . $ENV{'XINDYOPTS'} . ' %O -o %D %S';
sub xindy {
my @args = @_;
if (-z $args[-1]) {
# create an empty .ind file if .idx is empty
open(FH, ">" . $args[-2]);
close(FH);
return 0;
} else {
return system("xindy", @args);
}
}
{% else -%}
$makeindex = 'makeindex -s python.ist %O -o %D %S';
{% endif -%}