biblatex 错误:langbasque 未定义

biblatex 错误:langbasque 未定义

memoir在一本使用、babel和 的书本长度的文档中biblatex,我得到了关于巴斯克语的错误,尽管我没有(明确地)使用那种语言

在我使用 Mac TeXLive Utility 重新安装后仍然发生这种情况biblatex

错误来自日志(下面的列表是在重新安装 TeXLive 实用程序后更新的biblatex):

Package biblatex Info: Trying to load language 'english' -> 'mylanguagestrings'
...
Package biblatex Info: ... file 'mylanguagestrings.lbx' found.

(/Users/murray/Library/texmf/tex/latex/biblatex/lbx/mylanguagestrings.lbx
File: mylanguagestrings.lbx 
Package biblatex Info: Trying to load language 'english'...
Package biblatex Info: ... file 'english.lbx' found.

(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/lbx/english.lbx
File: english.lbx 2020/08/23 v3.15a biblatex localization (PK/MW)
)
Package biblatex Info: Trying to load language 'english'...
Package biblatex Info: ... file 'english.lbx' found.

(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/lbx/english.lbx
File: english.lbx 2020/08/23 v3.15a biblatex localization (PK/MW)


/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/lbx/english.lbx:571: Pack
age xkeyval Error: `langbasque' undefined in families `blx@lbx'. 

什么原因可能导致这个错误?

这是此文档的新现象:两三个月前我上次处理它时,没有发生过这样的错误。因此,错误可能是由于 中的某些更改造成的biblatex

我无法在 MWE 中重现该错误,不幸的是。不过,这里有相关信息。

序言部分包括:

\usepackage[T2A,T1]{fontenc}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}

\usepackage[russian,french,ngerman,polish,english]{babel}
  \babeltags{russian=russian,french=french,german=ngerman,polish=polish}

\RequirePackage[
  backend=biber,
  bibstyle=mybooknumeric,
  citestyle=numeric,
  dashed=true,
  defernumbers=true,
  urldate=iso,date=iso,seconds=true]%
{biblatex} 

\addbibresource{myyref.bib}

源目录使用以下内容biblatex.cfg

\ProvidesFile{biblatex.cfg}

\DeclareNameAlias{sortname}{family-given}
% Punctuation & delimiter mods:
\DeclareLanguageMapping{english}{mylanguagestrings} % external file!
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand{\subtitlepunct}{\addcolon\addspace}
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

% Field mods:
%\renewcommand*{\bibnamedash}{\rule{3em}{0.4pt}\hspace*{.16667em}\addcomma\addspace}
\renewcommand*{\bibnamedash}{\rule{3em}{0.4pt}\hskip 0.16667em plus 0.01em minus 0.01em\relax \addcomma\addspace}
%
\renewbibmacro*{addendum+pubstate}{%
  \setunit{\addsemicolon\space}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}
%
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{\mkbibemph{#1}}% no quote marks
  \DeclareFieldFormat{journaltitle}{#1}
%
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {volume}{\mkbibbold{#1}}  
\DeclareFieldFormat{pages}{#1}% no prefix for the `pages` field in the bibliography
%  
\DeclareFieldFormat{pages}{#1}% no prefix for the `pages` field

% URL mods:
%
% Original definitions in biblatex.def
% \DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}
\DeclareFieldFormat{url}{\url{#1}}
% \DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}

% Book mods:
\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}
  
% Article mods: 
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}% number of a journal
%
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \printfield{volume}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \setunit{\addcomma\space}%
  \printfield{eid}
  \newunit}

是否存在什么原因biblatex.cfg导致biblatex恢复到 3.15 版本?

mylanguagestrings中引用的文件biblatex.cfg位于~/Library/texmf/tex/latex/biblatex/lbx且包含内容:

    \ProvidesFile{mylanguagestrings.lbx}
    % with custom-english-ordinal-sscript
    %
    % If don't use babel, then use ``english'' versions of 
    % \InheritBibliographyExtras and \DefineBibliographyStrings
    % Redefines '\mkbibordinal' command so as to elide ordinal suffixes
    %
    \InheritBibliographyExtras{english}
    \DeclareBibliographyExtras{%
      \protected\def\mkbibordinal#1{%
    \begingroup%
     \@tempcnta0#1\relax\number\@tempcnta%%
        \endgroup}%
      \protected\def\mkbibmascord{\mkbibordinal}%
      \protected\def\mkbibfemord{\mkbibordinal}%
    }
    %
    % Original definition in english.lbx:
    % urlseen =    {{visited on}{visited on}},
    \DeclareBibliographyStrings{%
      inherit = {english},
      urlseen = {{accessed}{accessed}},
    }
    \DeclareBibliographyStrings{%
      inherit = {american},
      urlseen = {{accessed}{accessed}},
    }
    \endinput

是否存在什么原因mylanguagestrings.lbx导致biblatex恢复到 3.15 版本?

(以防万一它相关。)我也在使用以下文件~/Library/texmf/tex/latex/biblatex/bbx

\ProvidesFile{mybooknumeric.bbx}
\RequireBibliographyStyle{standard}
\RequireBibliographyStyle{numeric}
%
\DeclareBibliographyOption[boolean]{dashed}[true]{%
  \ifstrequal{#1}{true}
    {\ExecuteBibliographyOptions{pagetracker}%
     \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}}
    {\renewbibmacro*{bbx:savehash}{}}}
%
\newbibmacro*{bbx:savehash}{%
  \savefield{fullhash}{\bbx@lasthash}}
   
\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\printnames{author}%
      \setunit{\addcomma\space}%
      \usebibmacro{bbx:savehash}}%
    \usebibmacro{authorstrg}}
  {\global\undef\bbx@lasthash}}

\newbibmacro*{bbx:dashcheck}[2]{%
  \ifboolexpr{
    test {\iffieldequals{fullhash}{\bbx@lasthash}}
    and
    not test \iffirstonpage
  }
  {#1}
  {#2}}

可能相关:biblatex 忽略自己的 lbx 文件使用 biblatex 自己的 .lbx 文件

答案1

巴斯克语本地化已添加到biblatex 大约三个月前 (2020-11-10)并包含在 v3.16 中biblatex(2020-12-31 发布)。

如果您mylanguagestrings.lbx基于v3.16.lbx中的文件biblatex或于 2020-11-10 之后从 GitHub 获取,则可能包含对 的引用langbasque

.log表明您的biblatex安装的其余部分仍处于添加巴斯克语支持之前的 v3.15a (2020-08-23)。

更新您的biblatex安装并确保您的自定义文件与您的版本.lbx同步。biblatex

如果您需要快速解决方法并且无法更新,您可以尝试添加

\NewBibliographyString{langbasque}
\NewBibliographyString{frombasque}

以避免错误。

答案2

错误是由 ~/Library/texmf/web2c 中的一个旧 .fmt 文件引起的,该文件是我根据文档的序言编写的。该格式使用了旧版本的软件包,包括biblatexbabel

当我删除该 .fmt 后,该文档就可以正常编译。

\NewBibliographyString在使用以下修复程序后,我才想起这种现已过时的格式:https://tex.stackexchange.com/a/583988/13492。这样做消除了 的错误langbasque,但却引发了有关字符宽度不匹配的新错误。这就是我思考的问题!

相关内容