以下 LaTeX 手稿复制粘贴自 Nicola LC Talbot 的《词汇表包 v4.34:初学者指南》第 5-6 页,版本 2017-11-03 (关联)。
\documentclass{article}
\usepackage[sort=none]{glossaries-extra}
\newglossaryentry{potato}{name={potato},plural={potatoes},
description={starchy tuber}}
\newglossaryentry{cabbage}{name={cabbage},
description={vegetable with thick green or purple leaves}}
\newglossaryentry{turnip}{name={turnip},
description={round pale root vegetable}}
\newglossaryentry{carrot}{name={carrot},
description={orange root}}
\begin{document}
Chop the \gls{cabbage}, \glspl{potato} and \glspl{carrot}.
\printunsrtglossaries % list all entries
\end{document}
当我用它编译时pdflatex
,编译失败并显示以下错误消息:
! Package xkeyval Error: value `none' is not allowed.
See the xkeyval package documentation for explanation.
Type H <return> for immediate help.
...
l.784 \RequirePackage
{glossaries-compatible-307}
这是什么问题?我该如何解决?
按照egreg 的请求,这是\listfiles
的输出。
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
glossaries-extra.sty 2017/05/10 v1.15 (NLCT)
xkeyval.sty 2014/12/03 v2.7a package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
etoolbox.sty 2017/01/02 v2.4 e-TeX tools for LaTeX (JAW)
glossaries.sty 2017/01/19 v4.29 (NLCT)
ifthen.sty 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
mfirstuc.sty 2016/07/31 v2.04 (NLCT)
textcase.sty 2004/10/07 v0.07 Text only upper/lower case changing (DPC)
xfor.sty 2009/02/05 v1.05 (NLCT)
datatool-base.sty 2016/07/28 v2.27 (NLCT)
amsmath.sty 2016/11/05 v2.16a AMS math features
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
amsbsy.sty 1999/11/29 v1.2d Bold Symbols
amsopn.sty 2016/03/08 v2.02 operator names
substr.sty 2009/10/20 v1.2 Handle substrings
datatool-fp.sty 2016/07/28 v2.27 (NLCT)
fp.sty 1995/04/02
defpattern.sty 1994/10/12
fp-basic.sty 1996/05/13
fp-addons.sty 1995/03/15
fp-snap.sty 1995/04/05
fp-exp.sty 1995/04/03
fp-trigo.sty 1995/04/14
fp-pas.sty 1994/08/29
fp-random.sty 1995/02/23
fp-eqn.sty 1995/04/03
fp-upn.sty 1996/10/21
fp-eval.sty 1995/04/03
glossaries-compatible-307.sty 2017/01/19 v4.29 (NLCT)
glossary-hypernav.sty 2017/01/19 v4.29 (NLCT)
glossary-list.sty 2017/01/19 v4.29 (NLCT)
glossary-long.sty 2017/01/19 v4.29 (NLCT)
longtable.sty 2014/10/28 v4.11 Multi-page Table package (DPC)
glossary-super.sty 2017/01/19 v4.29 (NLCT)
supertabular.sty 2004/02/20 v4.1e the supertabular environment
glossary-tree.sty 2017/01/19 v4.29 (NLCT)
***********
答案1
您的 版本glossaries
太旧。该sort=none
选项于 v4.30(2017-06-11)引入glossaries
,因此如果您要使用,则需要更新。