我尝试在 MiKTeX 中使用 xindy。当我编译
\documentclass[a4paper]{article}
\usepackage{makeidx}
\makeindex
\begin{document}
test\index{test}\index{text}
\printindex
\end{document}
和
latex test.tex
texindy test.idx
它打印
C:/Program is not an internal command, external command, program or batch file.
Opening logfile "nul" (done)
Reading indexstyle...
Loading module "r0Ri4_6RwG"...
Loading module "lang/general/latin9-lang.xdy"...
Loading module "lang/general/latin9.xdy"...
Finished loading module "lang/general/latin9.xdy".
Finished loading module "lang/general/latin9-lang.xdy".
Loading module "tex/inputenc/latin.xdy"...
Finished loading module "tex/inputenc/latin.xdy".
Loading module "texindy.xdy"...
Loading module "numeric-sort.xdy"...
Finished loading module "numeric-sort.xdy".
Loading module "latex.xdy"...
Loading module "tex.xdy"...
Finished loading module "tex.xdy".
Finished loading module "latex.xdy".
Loading module "latex-loc-fmts.xdy"...
Finished loading module "latex-loc-fmts.xdy".
Loading module "makeindex.xdy"...
Finished loading module "makeindex.xdy".
Loading module "latin-lettergroups.xdy"...
Finished loading module "latin-lettergroups.xdy".
Finished loading module "texindy.xdy".
Loading module "page-ranges.xdy"...
Finished loading module "page-ranges.xdy".
Loading module "word-order.xdy"...
Finished loading module "word-order.xdy".
Finished loading module "r0Ri4_6RwG".
Finished reading indexstyle.
Finalizing indexstyle... (done)
Reading raw-index "zBpYoFHjX4"...
Finished reading raw-index.
Processing index... [10%] [20%] [30%] [40%] [50%] [60%] [70%] [80%] [90%] [100%]
Finished processing index.
Writing markup... [10%] [20%] [30%] [40%] [50%] [60%] [70%] [80%] [90%] [100%]
Markup written into file "test.ind".
问题是 text.ind 包含一个空的 theindex 环境。此外,使用该选项-d kepp_tmpfiles
我可以看到 raw-index 文件为空(上面的文件zBpYoFHjX4
)。
注意,来自 texindy 的错误/警告消息C:/Program is not an internal command, ...
。
我不知道以下内容是否相关。如果我尝试在 Cygwin 中编译 xindy,我会收到错误:
C:\Program Files (x86)\MiKTeX 2.9\scripts\xindy\texindy.pl: not a symlink as required for
TeX Live at C:\Program Files (x86)\MiKTeX 2.9\scripts\xindy\texindy.pl line 423.
如何解决这个问题?
答案1
没有必要更改 texindy.pl。请添加一行
$filter=quotify($filter);
在xindy.pl第719行下一行。修改后,sub filter_index变为如下形式:
sub filter_index ( $$ ) {
my ($filter, $input) = @_;
my $output = tmpnam();
push (@temp_files, $output);
$output=quotify($output);
$filter=quotify($filter);
print "Running filter: $filter <$input >$output\n" if $verbose;
system "$filter <$input >$output";
print "filtered xindy input file: $output\n" if $debug{script};
return $output;
}