编辑

编辑

我需要引用一些只知道大概日期的东西,即“大约YYYY”。通常,我会将其写为“cYYYY”。但是,如果我尝试将其放入date我的条目字段中.bib(我发现为时已晚......),我根本得不到日期。处理此类情况的正确方法是什么?

如果我使用year字段而不是date,输出是正确的,但我不确定这是否是处理这种情况的正确方法,因为year等主要是为了向后兼容而提供的。

无日期条目

\documentclass{article}
\usepackage{biblatex}
\begin{filecontents}{\jobname.bib}
  @book{mybook,
    author      =   {Author, A. N.},
    date        =   {c1550},
    title       =   {Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
\end{filecontents}
\bibliography{\jobname}
\begin{document}
  \fullcite{mybook}
\end{document}

编辑

暂且不论 的使用是否year已被弃用或是否适用于这种情况,简单地使用year并不是一个令人满意的解决方案的原因之一恰恰是因为 BibLaTeX 不能非常智能地解析它。请考虑以下示例:

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\begin{filecontents}{\jobname.bib}
  @book{book,
    author      =   {Author, A. N.},
    year        =   {c1550},
    title       =   {Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{prequel,
    author      =   {Author, A. N.},
    date        =   {1540},
    title       =   {Early Tudor Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{sequel,
    author      =   {Author, A. N.},
    year        =   {c1560},
    title       =   {Earlier Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{afterthought,
    author      =   {Author, A. N.},
    date        =   {1570},
    title       =   {Greatest Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
\end{filecontents}
\bibliography{\jobname}
\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

此处的条目应按日期顺序排序,但事实并非如此:

未分类的日期

答案1

在我看来year这是正确的领域。

除了我的意见之外,如果你想要你的“大约“要使排序处理器按正常年份进行计算,请在序言中添加以下几行:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
      \map[overwrite=false]{
          \step[fieldsource=year]
          \step[fieldset=sortyear, origfieldval, final]
          \step[fieldsource=sortyear, match={c}, replace={}]
    }
  }
}

这让处理器认为c前一年并不存在......

MWE(\addbibresource{\jobname.bib}代替\bibliography{\jobname}

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\begin{filecontents}{\jobname.bib}
  @book{book,
    author      =   {Author, A. N.},
    year        =   {c1550},
    title       =   {Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{prequel,
    author      =   {Author, A. N.},
    date        =   {1540},
    title       =   {Early Tudor Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{sequel,
    author      =   {Author, A. N.},
    year        =   {c1560},
    title       =   {Earlier Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{afterthought,
    author      =   {Author, A. N.},
    date        =   {1570},
    title       =   {Greatest Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
\end{filecontents}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
      \map[overwrite=false]{
          \step[fieldsource=year]
          \step[fieldset=sortyear, origfieldval, final]
          \step[fieldsource=sortyear, match={c}, replace={}]
    }
  }
}


\addbibresource{\jobname.bib}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}  

输出

在此处输入图片描述

答案2

现在可以使用biblatex3.5 来处理近似日期。根据文档(§2.3.8,第 36 页)和示例文件96-日期.tex,你可以使用日期字段写作date = {1550~}

\documentclass{article}
\usepackage[style=authoryear, 
    datecirca=true,
    ]{biblatex}
\begin{filecontents}{\jobname.bib}
  @book{book,
    author      =   {Author, A. N.},
    date        =   {1550~},
    title       =   {Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{prequel,
    author      =   {Author, A. N.},
    date        =   {1540},
    title       =   {Early Tudor Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{sequel,
    author      =   {Author, A. N.},
    date        =   {1560~},
    title       =   {Earlier Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
  @book{afterthought,
    author      =   {Author, A. N.},
    date        =   {1570},
    title       =   {Greatest Elizabethan Escapes},
    publisher   =   {Quills \& Offspring},
    location    =   {Hamlet, British Isles}}
\end{filecontents}
\bibliography{\jobname}
\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

结果如下:

在此处输入图片描述

编辑样式定制:

在序言中添加以下两行(参见文档§3.10.1,第 108-109 页):

\renewcommand{\datecircadelim}{}
\DefineBibliographyStrings{english}{circa = c}

在此处输入图片描述

相关内容