我在调用 makeglossaries 脚本时遇到问题。以下是 MWE:
% !TeX program = xelatex
% !TeX encoding = utf-8
% !TeX spellcheck = ru_RU
\documentclass[12pt, a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{russian}
\setmainfont[Ligatures=TeX]{Times New Roman}
\usepackage[xindy]{glossaries}
\makeglossaries
\begin{document}
\newacronym{exm}{123}{Пример} % russian acronym
Штука называется \gls{exm}. % some russian text
\printglossaries
\end{document}
系统:Windows 8、TeX Live 2013(最新)、TeXstudio 作为 IDE。第一次编译运行正常 - 我得到了 .glo .glsdefs 和 .xdy 文件。当我之后运行 makeglossaries 脚本时,我收到以下带有错误的日志:
ERROR: "A" does not name a letter group in
(DEFINE-LETTER-GROUP "glsnumbers" :PREFIXES
("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") :BEFORE "A")
*** Unable to execute: '"xindy" -L russian -C utf8 -I xindy -M "temp" -t "temp.glg" -o "temp.gls" "temp.glo"' ***
Failed with error code 1.
Status report:
Opening logfile "temp.glg" (done)
Reading indexstyle...
Loading module "0tI0EhWrtr"...
Loading module "lang/russian/utf8-lang.xdy"...
Loading module "lang/russian/utf8.xdy"...
Finished loading module "lang/russian/utf8.xdy".
Finished loading module "lang/russian/utf8-lang.xdy".
Loading module "temp.xdy"...
Loading module "tex.xdy"...
Finished loading module "tex.xdy".
Error in line 426:
; additional letter groups
(define-letter-group "glsnumbers"
:prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
:before "A")
ERROR: "A" does not name a letter group in
(DEFINE-LETTER-GROUP "glsnumbers" :PREFIXES
("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") :BEFORE "A")
C:\Dev\TeXLive\2013\bin\win32\runscript.tlu:650: command failed with exit code 1:
perl.exe c:/Dev/TeXLive/2013/texmf-dist/scripts/xindy/xindy.pl -L russian -C utf8 -I xindy -M "temp" -t "temp.glg" -o "temp.gls" "temp.glo"
我不明白为什么会发生这种情况。任何帮助都将不胜感激。
答案1
如果您不使用拉丁字母,则需要使用\GlsSetXdyFirstLetterAfterDigits
(before \makeglossaries
) 指定字母表的首字母,例如:
\GlsSetXdyFirstLetterAfterDigits{А}
或者您需要使用xindy={glsnumbers=false}
包选项:
\usepackage[xindy={glsnumbers=false}]{glossaries}