summaryrefslogtreecommitdiffstats
path: root/sphinx/texinputs/latexmkjarc_t
blob: c7403a90bec65f7e890a7d1708efdf221bb56eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$latex = '{{ latex_engine }} ' . $ENV{'LATEXOPTS'} . ' -kanji=utf8 %O %S';
$dvipdf = 'dvipdfmx %O -o %D %S';
$makeindex = 'internal mendex %S %B %D';
sub mendex {
  my ($source, $basename, $destination) = @_;
  my $dictfile = $basename . ".dic";
  unlink($destination);
  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'" );
}