\mkdatezeros 已弃用错误 - biblatex

\mkdatezeros 已弃用错误 - biblatex

我正在通过 overleaf 使用 LaTeX,如果我在参考书目中包含年份,则会出现以下错误:

Package biblatex Warning: '\mkdatezeros' is deprecated. Please use 
'\mkyearzeros', '\mkmonthzeros' or '\mkdayzeros' as appropriate. 
Falling back to '\mkmonthzeros'.

我不确定我到底做错了什么,所以非常感谢任何帮助。这是我的参考书目文件。

@article{inductionfirst,
author = {Vacca, G.},
journaltitle = {Bulletin of the American Mathematical Society},
number = {2},
pages = {70--73},
publisher = {American Mathematical Society},
title = {Maurolycus, the first discoverer of the principle of mathematical induction},
url = {https://projecteuclid.org:443/euclid.bams/1183420503},
volume = {16},
date = {1909}
}

@incollection{sep-recursive-functions,
    author       =  {Odifreddi, Piergiorgio and Cooper, S. Barry},
    title        =  {Recursive Functions},
    booktitle    =  {The Stanford Encyclopedia of Philosophy},
    editor       =  {Edward N. Zalta},
    url =   {https://plato.stanford.edu/archives/win2016/entries/recursive-functions/},
    date         =  {2016},
    edition      =  {Winter 2016},
    publisher    =  {Metaphysics Research Lab, Stanford University}
}

这是我的主文件的参考书目块。


\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{array}
\usepackage{hyperref}


\usepackage[
backend=biber,
style=mla,
sorting=none
]{biblatex}
\addbibresource{bibliography.bib}

答案1

在大多数情况下,警告

Package biblatex Warning: '\mkdatezeros' is deprecated.
(biblatex)                Please use '\mkyearzeros', '\mkmonthzeros' or
(biblatex)                '\mkdayzeros' as appropriate. 
(biblatex)                Falling back to '\mkmonthzeros'.

无需担心。biblatex-mla设置datezeros=false,并且通过该设置,所有这些宏的定义都是相同的。这意味着修复此警告并不紧急;行为将与以前一样。

无论如何,这样的警告是针对软件包维护者的,而不是针对用户的,因为成本加运费指出在评论中。不过,这还是应该引起维护人员的注意。所以我在https://github.com/jmclawson/biblatex-mla/issues/21

如果你现在想摆脱警告,你可以在序言中添加以下内容

\DefineBibliographyExtras{english}{%
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}
       {\bibstring{\thefield{#1}}}
       {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
  \protected\def\mkbibdateshort#1#2#3{%
    \iffieldundef{#3}
      {}
      {\mkdayzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{/}}%
    \iffieldundef{#2}
      {}
      {\mkmonthzeros{\thefield{#2}}%
       \iffieldundef{#1}{}{/}}%
    \iffieldbibstring{#1}
       {\bibstring{\thefield{#1}}}
       {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
}

或者您可以加载babel语言american,因为某种原因,american本地化模块根本biblatex-mla无法使用。\mkdatezeros

相关内容