为什么我会收到错误“!包 keyval 错误:没有为 labeldate 指定值。”?

为什么我会收到错误“!包 keyval 错误:没有为 labeldate 指定值。”?

我收到此错误:

Package biblatex Info: ... file 'authoryear-icomp.cbx' found.
 (authoryear-icomp.cbx.tex
File: authoryear-icomp.cbx 2016/09/17 v3.6 biblatex citation style (PK/JW/AB)


! Package keyval Error: No value specified for labeldate.

See the keyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.5 ...     pagetracker,sortcites,autocite=inline}

Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

authoryear-icomp.cbx.tex出现错误的行是:

\ExecuteBibliographyOptions{labeldate,uniquename,uniquelist,ibidtracker=constrict,
                            pagetracker,sortcites,autocite=inline}

这是 MWE(几天前它可以工作,今天我用 MiKTeX 2.9 更新了软件包):

\documentclass[11pt,openright]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[british]{babel}

% biblatex
\usepackage[style=authoryear-icomp, natbib=true, maxcitenames=2, maxbibnames=11, backend=biber, hyperref=true, pagetracker=page]{biblatex} 
\usepackage{csquotes}

% package hyperref
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 0.7},backref=false,colorlinks=false]
{hyperref}

% add bibliography database
\addbibresource{biblatex-examples.bib}

\begin{document}
Test text \cite{aristotle:rhetoric}.

\printbibliography

\end{document}

下面是我正在使用的软件包版本的列表:

 *File List*
    book.cls    2014/09/29 v1.4h Standard LaTeX document class
    bk11.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2016/06/19 v1.99m Standard LaTeX file
inputenc.sty    2015/03/17 v1.2c Input encoding file
  latin9.def    2015/03/17 v1.2c Input encoding file
   babel.sty    2016/04/23 3.9r The Babel package
 bblopts.cfg
 english.ldf    2012/08/20 v3.3p English support from the babel system
biblatex.sty    2016/09/17 v3.6 programmable bibliographies (PK/JW/AB)
pdftexcmds.sty    2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
   ifpdf.sty    2016/05/14 v3.1 Provides the ifpdf switch
etoolbox.sty    2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
  logreq.sty    2010/08/04 v1.0 xml request logger
  logreq.def    2010/08/04 v1.0 logreq spec v1.0
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 xstring.sty    2013/10/13  v1.7c  String manipulations (C Tellechea)
  blx-dm.def
authoryear-icomp.dbx
biblatex-dm.cfg
blx-compat.def    2016/09/17 v3.6 biblatex compatibility (PK/JW/AB)
biblatex.def    2016/09/17 v3.6 biblatex compatibility (PK/JW/AB)
blx-natbib.def    2016/09/17 v3.6 biblatex compatibility (PK/JW/AB)
standard.bbx    2016/09/17 v3.6 biblatex bibliography style (PK/JW/AB)
authoryear.bbx    2016/09/17 v3.6 biblatex bibliography style (PK/JW/AB)
authoryear-icomp.bbx    2016/09/17 v3.6 biblatex bibliography style (PK/JW/AB)
authoryear-icomp.cbx    2016/09/17 v3.6 biblatex citation style (PK/JW/AB)
biblatex.cfg    
csquotes.sty    2016/07/14 v5.1h context-sensitive quotations (JAW)
csquotes.def    2016/07/14 v5.1h csquotes generic definitions (JAW)
csquotes.cfg    
hyperref.sty    2016/06/24 v6.83q Hypertext links for LaTeX
hobsub-hyperref.sty    2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2016/05/16 v1.14 Construct package bundles (HO)
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdfescape.sty    2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2016/05/16 v1.4 Expandable calculations on big integers (HO)
  bitset.sty    2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty    2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty    2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
 hopatch.sty    2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty    2016/05/16 xcolor patch
atveryend.sty    2016/05/16 v1.9 Hooks at the very end of document (HO)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
refcount.sty    2016/05/16 v3.5 Data extraction from label references (HO)
 hycolor.sty    2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
  pd1enc.def    2016/06/24 v6.83q Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
   puenc.def    2016/06/24 v6.83q Hyperref: PDF Unicode definition (HO)
 hpdftex.def    2016/06/24 v6.83q Hyperref driver for pdfTeX
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
 english.lbx    2016/09/17 v3.6 biblatex localization (PK/JW/AB)
 british.lbx    2016/09/17 v3.6 biblatex localization (PK/JW/AB)
TEX_SE_Domanda.bbl
 nameref.sty    2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
TEX_SE_Domanda.out
TEX_SE_Domanda.out
 ***********

答案1

在 3.5 版中biblatex

\ExecuteBibliographyOptions{labeldate,uniquename,uniquelist,ibidtracker=constrict,
                            pagetracker,sortcites,autocite=inline}

将导致以下形式的错误

! Package keyval Error: No value specified for labeldate.

什么曾是该选项labeldate已重命名为labeldateparts。该选项要求 Biber 提供labelyear字段和朋友并通过提供年份消歧义extrayear

现在有了一个新的labeldate选项,但它现在需要一个参数(在上面的例子中,该选项没有附带参数,因此会导致错误)。此选项控制labelyear和朋友给出的日期的格式。

请参阅 v 3.5 部分变更文件


使用标准样式时,您不会遇到此问题,因为它们已更新为使用正确的选项。如果您使用自定义样式,请通知作者以便她可以更改此设置。

正如评论中所讨论的,这里的问题是一个本地文件,authoryear-icomp.cbx.tex其中包含一个旧副本,authoryear-icomp.cbx其中仍使用旧选项。加载的是这个文件而不是(现有的)标准文件,这导致了问题。删除该文件解决了这个问题。

相关内容