我在台式机和笔记本电脑上编译相同文件时遇到了错误。我运行的是 MikTeX 2.9 的一部分 XeTeX。
MWE test2.tex 是:
\documentclass{article}
\usepackage{lipsum}
\makeindex
\begin{filecontents*}{test2.xdy}
(define-location-class "arabic-page-numbers"
("arabic-numbers") :min-range-length 1)
\end{filecontents*}
\begin{document}
\index{law}
\lipsum[1]
\index{law|seealso{system}}
\end{document}
笔记本电脑上的 xindy 日志为:
Command Line: C:\Users\me\Documents\localtexmf\miktex\bin\texindy.bat "test2.idx" -M "test2.xdy"
Startup Folder: C:\Users\me\Documents\Law\Brunoy
Opening logfile "nul" (done)
Reading indexstyle...
Loading module "FZjbLHpwTY"...
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".
Loading module "test2.xdy"...
WARNING: redefining location-reference-class `"arabic-page-numbers"' !
Finished loading module "test2.xdy".
Finished loading module "FZjbLHpwTY".
Finished reading indexstyle.
Finalizing indexstyle... (done)
Reading raw-index "4hBqChFmSb"...
Finished reading raw-index.
Processing index... [10%]
ERROR: SLOT-VALUE: The class #<STANDARD-CLASS LOCREF:CROSSREF-LOCATION-REFERENCE> has no slot named BASE:ORDNUMS
删除 test2.xdy 中的两行即可解决问题。注释掉 \begin{document} 和 \end{documents} 之间的任何三行也可以解决问题。
当我缩减文件以达到 MWE 时,我得到了错误的变体“...没有名为 BASE:TARGET 的插槽”。
在相同版本的 MikTeX (2.9) 下,桌面上没有问题。
答案1
我不是 xindy 专家,但使用以下命令,奇怪的错误将会消失:
\documentclass{article}
\usepackage{lipsum}
\makeindex
\begin{filecontents*}{test2.xdy}
(define-crossref-class "see also")
(define-location-class "arabic-page-numbers"
("arabic-numbers") :min-range-length 1)
\end{filecontents*}
\begin{document}
\index{law}
\lipsum[1]
\index{system}
\index{law|seealso{system}}
\end{document}