bibtex-date 字段中可以有多个条目吗?

bibtex-date 字段中可以有多个条目吗?

我的文档经常引用同一期刊的多个期刊的文章,如下例所示。在构建文件时,biber抱怨这不是正确的date格式,因此,日期从参考输出中省略。

bibtex据我所知,这是一种预期的行为,因为日期格式必须是 YYYY-MM-DD。

但是:有没有办法在一篇文章中包含多个日期?

以下是示例:

@ARTICLE{Lazarus1856,
  author = {Lazarus},
  title = {Hebräische Poesie},
  journal = {Literaturblatt des Deutschen Kunstblatts},
  volume = {3},
  year = {1856},
  pages = {6-8, 11-12},
  number = {2,3},
  date = {1856-01-24,1856-02-07},
  timestamp = {2011.12.12}
}

我正在使用 JabRef、TexLive、Kile、XeLaTex 和 Biblatex-Biber。

答案1

无法向 的任何biblatex标准日期字段添加多个日期。date字段必须以 ISO 8601/EDTF 格式填充,Biber 将忽略格式错误的字段。这意味着您可以添加日期跨度(间隔),但这不是我们想要的。

通常,一部作品会在特定日期出版,不需要多个日期。少数情况下,这实际上是一个问题,即一篇文章有​​多期或有多卷书。biblatex可以很好地处理多卷书,因此我们将重点关注为系列文章添加类似的支持。

我们首先来看看如何biblatex处理多卷书。biblatex-examples.bib你会发现

@book{knuth:ct:related,
  author       = {Knuth, Donald E.},
  title        = {Computers \& Typesetting},
  date         = {1984/1986},
  volumes      = 5,
  publisher    = {Addison-Wesley},
  location     = {Reading, Mass.},
  sortyear     = {1984-0},
  related      = {knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e},
  relatedtype  = {multivolume},
}

然后对所有卷knuth:ct:a等进行单独的条目。

前段时间有一个biblatex在bugtracker上提出关于此问题的功能请求。我们将遵循那里的想法。与multivolume上面的方法类似,我们创建一个。仅relatedtype serialarticle对于相关的、、(、)和被打印(当然这可以扩展以打印其他字段,例如 DOI 和 URL)。serialarticlevolumenumbereidissuedatepages

\DeclareFieldFormat{related:serialarticle}{#1}
\renewcommand*{\relateddelim}{\adddot\par\nobreak}
\newcommand*{\relateddelimserialarticle}{\addcomma\space}

\newbibmacro*{related:serialarticle}[1]{%
  \entrydata{#1}{%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \iffieldundef{pages}
    {}
    {\setunit{\bibpagespunct}%
     \printfield{pages}}}}

你的例子看起来会像这样

@article{Lazarus1856,
  author      = {Lazarus},
  title       = {Hebräische Poesie},
  journal     = {Literaturblatt des Deutschen Kunstblatts},
  volume      = {3},
  date        = {1856},
  related     = {Lazarus1856-1,Lazarus1856-2},
  relatedtype = {serialarticle},
}
@article{Lazarus1856-1,
  crossref  = {Lazarus1856},
  pages     = {6-8},
  number    = {2},
  date      = {1856-01-24},
  options   = {dataonly},
}
@article{Lazarus1856-2,
  crossref  = {Lazarus1856},
  pages     = {11-12},
  number    = {3},
  date      = {1856-02-07},
  options   = {dataonly},
}

author它由一个包含不变量( 、title、 也volume应该有一个date/ year)的“主”条目和两个包含、和dataonly的实际部分的条目组成(我们也将它返回到,这样这两个条目也可以独立存在)。主条目与其部分相关,就像一本多卷书一样numberdatepagescrossrefLazarus1856

  related     = {Lazarus1856-1,Lazarus1856-2},
  relatedtype = {serialarticle},

平均能量损失

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=authortitle,backend=biber]{biblatex}

\DeclareFieldFormat{related:serialarticle}{#1}
\renewcommand*{\relateddelim}{\adddot\par\nobreak}
\newcommand*{\relateddelimserialarticle}{\addcomma\space}

\newbibmacro*{related:serialarticle}[1]{%
  \entrydata{#1}{%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \iffieldundef{pages}
    {}
    {\setunit{\bibpagespunct}%
     \printfield{pages}}}}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Lazarus1856,
  author      = {Lazarus},
  title       = {Hebräische Poesie},
  journal     = {Literaturblatt des Deutschen Kunstblatts},
  volume      = {3},
  date        = {1856},
  related     = {Lazarus1856-1,Lazarus1856-2},
  relatedtype = {serialarticle},
}
@article{Lazarus1856-1,
  crossref  = {Lazarus1856},
  pages     = {6-8},
  number    = {2},
  date      = {1856-01-24},
  options   = {dataonly},
}
@article{Lazarus1856-2,
  crossref  = {Lazarus1856},
  pages     = {11-12},
  number    = {3},
  date      = {1856-02-07},
  options   = {dataonly},
}
\end{filecontents*}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
  \nocite{Lazarus1856,knuth:ct:related}
  \printbibliography
\end{document}

拉撒路。 “希伯来诗歌”。出处:Literaturblatt des Deutschen Kunstblatts 3 (1856)。 3.2(1856 年 1 月 24 日),第 6-8 页,3.3(1856 年 2 月 7 日),第 11-12 页。

答案2

这真是太聪明了。但是,是不是也有点疯狂呢?

如果我要编目一本两卷的书,每卷出版的年份不同,那么应该可以说“date = {1996, 1997}”。就这么简单。这是常识。与上面给出的冗长解决方案不同,应该对 biber/biblatex 进行稍微修改以适应现实世界的情况。

我猜解决方法是使用年份字段。

答案3

将年份视为字符串文字是可行的,尽管当年份很多时效果并不好。例如,这种构造可用于列出某部作品的所有版本。

===

可以让 Biblatex 在引文中打印一系列“年份”

多年

但这意味着根本不使用日期字段,而是将年份视为单词文字的列表。

在 Biblatex 中,日期字段(例如date)是日期时间或日期时间跨度,并会自动解析为日、月、年(以及时、分、秒)部分(以及结束日、结束月份等)。

姓名列表,例如authoreditor,是由“和”分隔的姓名列表,并解析为姓名部分(名字、姓氏等)。单词姓名,例如“亚里士多德”,被视为姓氏。

如果我们有这样的条目

@book{twee,Author ={Foo Barnum Tweedledee and Bar Bailey Tweedledum},date ={1873},title={A Series of Peripatetic Encounters with Interesting People},location={London and New York},}

姓氏印在引用中(使用作者标题样式,如 ext-authortitle):

姓

如果我们有像这样的多作者作品

@book{ancgreek,Title ={The IP of Classical Greece\textsuperscript{ver1}},date={-0500/-0300},author={Aristotle and Plato and  Socrates and Archimedes and Euclid and Pericles and Aristophanes and Pindar and Homer},}

et al(或and others)当作者列表超过默认值 3 时,将截断作者列表

亚里士多德和他的朋友们

我们可以et al使用和maxnames相关选项(此处的条目本身)调整阈值,

@book{ancgreek2,Title ={The IP of Classical Greece\textsuperscript{ver2}},date={-0499/-0299},author={Aristotle and Plato and  Socrates and Archimedes and Euclid and Pericles and Aristophanes and Pindar and Homer},options = {maxnames=50},}

获得更完整的名称列表(以逗号分隔)。

亚里士多德和其他所有人

第三种 Biblatex 数据类型是文字列表,即名称列表(例如出版商或位置),这些名称用“和”分隔,不会拆分成名称部分并存储在名称部分字段中。

回顾我们的岁月:

我们将使用文字列表来存储年份字符串。我们将其命名为datestext

我们需要将字段添加到数据模型中,

\DeclareDatamodelFields[type=list, datatype=literal]{
  datestext,
}

它必须存在于.dbx文件中。让我们调用该文件dmf_dt.dbx并使用以下选项将其告知 Biblatex datamodel

datamodel=dmf_dt,

现在我们需要一个新的 bibmacro 来打印列表并将其括在括号中。

但:生活在门槛\mkbibparens{\printlist{datestext}}的魔咒之下et al

年等

甚至连maxnames反制法术也无法将其消除。(Publisherlocation遭受同样的et al命运。)

幸运的是,\printlist可以进行循环,从 1 到列表末尾:\printlist[][1-\value{listtotal}]{datestext}

最后,我们需要一个\DeclareCiteCommand来定义一个新的 cite 命令(称之为citedatestext),它将调用 bibmacro。为方便起见,我们还将同时打印标题字段(使用\printfield{title},而不是usebibmacro{title}引入空格和标点符号的 )。

循环浏览编年史

当然,年份只是看起来像日期。它们不是 Biblatex 可以应用其强大的日期和时代计算的“真实”日期。任何字符串序列都可以进入文字列表。

任意字符串

注意:在这个思想实验中,只定义了引用命令;参考文献在参考书目中“正常”打印。需要一个新的或修改过的书目驱动程序来处理新字段。

数据库名称:

\DeclareDatamodelFields[type=list, datatype=literal]{
  datestext,
}

梅威瑟:

% arara: xelatex
% arara: biber
% arara: xelatex 
\RequirePackage{filecontents}


\begin{filecontents*}{\jobname.bib}

@book{lewis,Author ={C S Lewis},date ={1898/1963},}


@book{twee,Author ={Foo Barnum Tweedledee and Bar Bailey Tweedledum},date ={1873},title={A Series of Peripatetic Encounters with Interesting People},location={London and New York},}

@book{twee2,Author ={Foo Barnum Tweedledee and Bar Bailey Tweedledum and Alice Goldilocks},date ={1876},title={Further Peripatetic Encounters with Interesting People},location={London and New York and Paris and Rome},}

%@book{chroniclesofnarnia,Title ={The Chronicles of Narnia},crossref ={lewis},sortkey ={Chronicles of Narnia},keywords ={series, school},}
%
%@book{chroniclesofnarnia2,Title ={The Chronicles of Narnia2},date={1950/1956},sortkey ={Chronicles of Narnia},keywords ={series, school},}

@book{ancgreek,Title ={The IP of Classical Greece\textsuperscript{ver1}},date={-0500/-0300},author={Aristotle and Plato and  Socrates and Archimedes and Euclid and Pericles and Aristophanes and Pindar and Homer},}

@book{ancgreek2,Title ={The IP of Classical Greece\textsuperscript{ver2}},date={-0499/-0299},author={Aristotle and Plato and  Socrates and Archimedes and Euclid and Pericles and Aristophanes and Pindar and Homer},options = {maxnames=50},}

@book{ancgreek3,Title ={IP of Classical Greece -- the Reflowering},subtitle={The Renaissance},date={1400/1500},author={Aristotle and Plato and  Socrates and Archimedes and Euclid and Pericles and Aristophanes and Pindar and Homer},options = {maxnames=50},}

@book{chroniclesofnarnia3a,Title ={The Chronicles of Narnia\textsuperscript{ver3a}},date={1950/1956},sortkey ={Chronicles of Narnia},crossref ={lewis},keywords ={series, school},
datestext={1950 and 1951 and 1952 and 1953 and 1954 and 1955 and 1956},
%options = {maxnames=999},
}

@book{chroniclesofnarnia3a1,Title ={The Chronicles of Narnia},date={1950/1956},sortkey ={Chronicles of Narnia},crossref ={lewis},keywords ={series, school},
datestext={1950 and 1951 and 1952 and 1953 and 1954 and 1955 and 1956},
options = {maxnames=999},
}


@book{chroniclesofnarnia3b,Title ={The Chronicles of Narnia\textsuperscript{ver3b}},date={1950/1956},sortkey ={Chronicles of Narnia},crossref ={lewis},keywords ={series, school},
datestext={1950 and 1951 and 1952 and 1953 and 1954 and 1955 and 1956},
options = {maxnames=999},
}

@book{chroniclesofnarnia3c,Title ={The Chronicles of Narnia\textsuperscript{ver3c}},date={1950/1956},sortkey ={Chronicles of Narnia},crossref ={lewis},keywords ={series, school},
datestext={1950 and 1951 and 1952 and 1953 and 1954 and 1955 and 1956},
%options = {maxnames=999},
}
@book{chroniclesofnarnia4,Title ={The Chronicles of Narnia\textsuperscript{ver4}},date={1950/1956},sortkey ={Chronicles of Narnia},crossref ={lewis},keywords ={series, school},
datestext={book 1 and {Susan and Peter} and something about a chair and string and string and string and book 7},options = {maxnames=999},
}


@book{bsm27,Title ={The Lion, the Witch and the Wardrobe },Date ={1950},Series ={Chronicles of Narnia},Number ={1},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia01},shorthand ={CSL--N1},keywords ={series},}
@book{bsm28,Title ={Prince Caspian },Date ={1951},Series ={Chronicles of Narnia},Number ={2},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia02},shorthand ={CSL--N2},keywords ={series},}
@book{bsm29,Title ={The Voyage of the Dawn Treader },Date ={1952},Series ={Chronicles of Narnia},Number ={3},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia03},shorthand ={CSL--N3},keywords ={series},}
@book{bsm30,Title ={The Silver Chair },Date ={1953},Series ={Chronicles of Narnia},Number ={4},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia04},shorthand ={CSL--N4},keywords ={series},}
@book{bsm31,Title ={The Horse and His Boy },Date ={1954},Series ={Chronicles of Narnia},Number ={5},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia05},shorthand ={CSL--N5},keywords ={series},}
@book{bsm32,Title ={The Magician's Nephew },Date ={1955},Series ={Chronicles of Narnia},Number ={6},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia06},shorthand ={CSL--N6},keywords ={series},}
@book{bsm33,Title ={The Last Battle },Date ={1956},Series ={Chronicles of Narnia},Number ={7},xref ={chroniclesofnarnia},sortkey ={Chronicles of Narnia07},shorthand ={CSL--N7},keywords ={series},}

\end{filecontents*}


\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\usepackage[british]{babel}
\usepackage{csquotes}
\newcommand\abibname{ext-authortitle}
\newcommand\abibstyle{style=\abibname}
\usepackage[
    datamodel=dmf_dt,
    \abibstyle , 
%maxnames=99,
%minnames=99,
%maxcitenames=99,
%mincitenames=99,   
dateera=christian,
        ]{biblatex}
\newcommand\mynote{biblatex option used: \texttt{\abibstyle}.}
\defbibnote{abibnote}{\mynote}


\usepackage{xcolor}
\pagecolor{red!3}


\addbibresource{\jobname.bib}

%\ExecuteBibliographyOptions[book]{maxnames=99}

\newbibmacro*{possum}{%
\mkbibparens{\printlist[][1-\value{listtotal}]{datestext}}}    


\newbibmacro*{possum2}{%
\mkbibparens{\printlist{datestext}}}    




\DeclareCiteCommand{citedatestext}[]{}{%
\printfield{title}  \usebibmacro{possum}}{}{}

\DeclareCiteCommand{citedatestextb}[]{}{%
\printfield{title}  \usebibmacro{possum2}}{}{}

%  \DeclareCiteCommand{\longcite}
%  {\usebibmacro{prenote}}%
%  {\usebibmacro{citeindex}%
%   \defcounter{maxnames}{99}%
%   \usebibmacro{cite}}
%  {\multicitedelim}
%  {\usebibmacro{postnote}}

%  \newtoggle{bbx:allnames}
%\togglefalse{bbx:allnames}
%\AtEveryBibitem{\iftoggle{bbx:allnames}{\defcounter{maxnames}{999}}{}}


\begin{document}

\citedatestext{chroniclesofnarnia3a1}
\vskip1em

\cite{twee}
\vskip1em

%\cite{twee2}

 \cite{ancgreek}
\vskip1em

 \cite{ancgreek2}
\vskip1em 

% \cite{ancgreek3}

 \citedatestextb{chroniclesofnarnia3a} -- without maxnames=, with plain \textbackslash \texttt{printlist}
\vskip1em

\citedatestextb{chroniclesofnarnia3b} -- with maxnames=,with plain \textbackslash \texttt{printlist}
\vskip1em

\citedatestext{chroniclesofnarnia3c} -- with looping \textbackslash \texttt{printlist}
\vskip1em

\citedatestext{chroniclesofnarnia4} -- arbitrary strings





\printbibliography[prenote=abibnote]


\begin{center}
\textemdash
\textemdash
\end{center}
\end{document}

相关内容