未定义的控制序列:\ResetDatamodelConstraints 在 biblatex 3.x 中

未定义的控制序列:\ResetDatamodelConstraints 在 biblatex 3.x 中

我有以下最小工作示例:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.dbx}  
    \ResetDatamodelEntrytypes
    \ResetDatamodelFields
    \ResetDatamodelEntryfields
    \ResetDatamodelConstraints
\end{filecontents}

\documentclass{report}

\usepackage[backend=biber,datamodel=\jobname]{biblatex}

\begin{document}
This is a minimal working example.
\end{document}

在我的环境中使用 texlive 的最新更新(pdflatex 3.14159265-2.6-1.40.17,biblatex 3.7)进行编译时引发以下错误:

    This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/filecontents/filecontents.sty)

(/usr/local/texlive/2016/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2016/texmf-dist/tex/latex/biblatex/biblatex.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/local/texlive/2016/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/local/texlive/2016/texmf-dist/tex/latex/logreq/logreq.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/logreq/logreq.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/xstring/xstring.tex))
(/usr/local/texlive/2016/texmf-dist/tex/latex/biblatex/blx-dm.def) (./test.dbx
! Undefined control sequence.
\ResetDatamodelConstraints ...tamodel@constraints 
                                                  \@empty 
l.9 \ResetDatamodelConstraints

? 

我从中提取的代码在更新我的 tex 环境之前是有效的。在当前biblatex 文档命令\ResetDatamodelConstraints仍然有效。查看blx-dm.def还可以找到命令定义。

这里出了什么问题?

答案1

\这是由于拼写错误造成的,具体来说,是 中缺少blx-dm.def。这个问题已经为人所知,几周前已在 Github 上修复(https://github.com/plk/biblatex/commit/8d90d5c4897a8316de5f51fce7810c12a75846a8)。不过,修复该问题的版本(3.8)尚未发布。

与此同时,添加

  \renewrobustcmd*{\ResetDatamodelConstraints}{%
    \global\let\blx@bcf@datamodel@constraints\@empty}

到你的.dbx

相关内容