我正在对软件包进行引用biblatex
,并且我希望引用条目后面总是跟有勘误表(如果有的话),这样人们就不会错过它。
问题是,我还希望参考条目按其在文本中出现的顺序进行编号。在这种情况下,如果勘误表没有在其主要条目之后立即被引用,它就不会跟随它。
无论编号规则如何,我能否确保参考条目后面总是跟有勘误表?
这是我现在正在做的事情的一个例子
% !Mode:: "TeX:UTF-8"
% !BIB TS-program = biber
\documentclass[english]{article}
\usepackage{babel}
\usepackage[colorlinks = false, pdfborderstyle ={/S/D}]{hyperref}
\usepackage[style = numeric, sorting = none, maxnames = 3, minnames = 2, backref = true, backrefstyle = three, arxiv = abs, doi = true]{biblatex}
\DeclareFieldFormat[article]{title}{}
\usepackage{doi}
\usepackage{filecontents}
\begin{filecontents*}{biber.bib}
@article
{
a.aad.atlas_2011_2.76_tev_jet,
author = {G. Aad and others},
title = {Measurement of the inclusive jet cross section in $p p$ collisions at $\sqrt({s} = 2.76 \mathrm{TeV}$ and comparison to the inclusive jet cross section at $\sqrt({s} = 7 \mathrm{TeV}$ using the ATLAS detector},
journal = {The European Physical Journal C},
year = {2013},
month = {August},
volume = {73},
number = {2509},
doi = {10.1140/epjc/s10052-013-2509-4},
}
@article
{
a.aad.atlas_2011_7_tev_jet,
author = {G. Aad and others},
journal = {Journal of High Energy Physics},
month = {February},
title = {Measurement of the inclusive jet cross-section in proton-proton collisions at $\sqrt({s} = 7 \mathrm{TeV}$ using $4.5 \mathrm{fb}^{−1}$ of data with the ATLAS detector},
volume = {02},
number = {153},
year = {2015},
doi = {10.1007/JHEP02(2015)153},
addendum = {\textbf{Erratum}: \cite{a.aad.erratum_atlas_2011_7_tev_jet}},
}
@article
{
a.aad.erratum_atlas_2011_7_tev_jet,
author = {G. Aad and others},
title = {Erratum: Measurement of the inclusive jet cross-section in proton-proton collisions at $\sqrt{s} = 7 \mathrm{TeV}$ using $4.5 \mathrm{fb}^{−1}$ of data with the ATLAS detector},
journal = {Journal of High Energy Physics},
year = {2015},
month = {September},
volume = {09},
number = {141},
doi = {10.1007/JHEP09(2015)141},
}
\end{filecontents*}
\addbibresource{biber.bib}
\begin{document}
I will first cite \cite{a.aad.atlas_2011_7_tev_jet}, which has the erratum, then \cite{a.aad.atlas_2011_2.76_tev_jet}.
\newpage
\pagestyle{plain}
\printbibliography
\end{document}
这是它生成的参考页面
提前致谢!
答案1
在其他sorting
设置中,可以使用和调整勘误表的排序sortyear
,sorttitle
以便它始终出现在相关文章之后。但是sorting=none,
没有条目的属性.bib
控制排序位置:重要的是条目在 TeX 文档中的引用顺序。因此,您必须\nocite
在第一次引用文章后立即手动输入勘误表。当然,这很乏味,而且容易出错。
入口集
正如所提到的莱安德里斯 在评论中您可以使用@set
基于 - 的方法将两个条目合并为一个。使用此subentry
选项仍然可以单独引用每个项目。可以关闭此功能,但您可能希望删除它,addendum = {\textbf{Erratum}: \cite{a.aad.erratum_atlas_2011_7_tev_jet}},
因为输出看起来有点循环。
\documentclass[english]{article}
\usepackage{babel}
\usepackage[style = numeric, sorting = none,
subentry,
maxnames = 3, minnames = 2,
backref = true, backrefstyle = three,
arxiv = abs, doi = true]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\pertype{article}
\step[fieldset=title, null]
}
}
}
\begin{filecontents*}{\jobname.bib}
@article{a.aad.atlas_2011_2.76_tev_jet,
author = {G. Aad and others},
title = {Measurement of the inclusive jet cross section in
$p p$ collisions at $\sqrt({s} = 2.76 \mathrm{TeV}$
and comparison to the inclusive jet cross section
at $\sqrt({s} = 7 \mathrm{TeV}$ using the ATLAS detector},
journal = {The European Physical Journal C},
year = {2013},
month = aug,
volume = {73},
number = {2509},
doi = {10.1140/epjc/s10052-013-2509-4},
}
@article{a.aad.atlas_2011_7_tev_jet,
author = {G. Aad and others},
journal = {Journal of High Energy Physics},
month = feb,
title = {Measurement of the inclusive jet cross-section
in proton-proton collisions
at $\sqrt({s} = 7 \mathrm{TeV}$
using $4.5 \mathrm{fb}^{−1}$
of data with the ATLAS detector},
volume = {02},
number = {153},
year = {2015},
doi = {10.1007/JHEP02(2015)153},
addendum = {\textbf{Erratum}: \cite{a.aad.erratum_atlas_2011_7_tev_jet}},
}
@article{a.aad.erratum_atlas_2011_7_tev_jet,
author = {G. Aad and others},
title = {Erratum: Measurement of the inclusive jet cross-section
in proton-proton collisions at $\sqrt{s} = 7 \mathrm{TeV}$
using $4.5 \mathrm{fb}^{−1}$ of data with the ATLAS detector},
journal = {Journal of High Energy Physics},
year = {2015},
month = sep,
volume = {09},
number = {141},
doi = {10.1007/JHEP09(2015)141},
}
@set{atlasset,
entryset= {a.aad.atlas_2011_7_tev_jet,a.aad.erratum_atlas_2011_7_tev_jet},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
I will first cite \cite{atlasset}, which has the erratum,
then \cite{a.aad.atlas_2011_2.76_tev_jet}.
\printbibliography
\end{document}
您不必在文件@set
中定义条目.bib
。如果您愿意,您可以从.tex
文件中动态定义一个集合。请参阅 §3.13.5入口集的biblatex
文档。
related
条目
@set
s 很不错,但它们的行为在非numeric
样式中并没有特别明确的定义。它们通常也用于对同类条目进行分组,而不是对具有父子关系的条目进行分组。
父子关系通常使用 的biblatex
特征进行建模related
。该特征的优点related
是它可以使数据中的条目之间的关系明确,并且可以以父级数据仍然可用的方式处理子条目,从而可以更紧密地集成两个条目。
勘误表没有预定义related
功能,但默认定义经过少量修改已经可以给出合理的结果。(请注意,该author
字段会自动被抑制,因为它与父条目的字段相同。如果名称不同,则会显示它们。当然可以进行调整。)
\documentclass[english]{article}
\usepackage{babel}
\usepackage[style = numeric, sorting = none,
subentry,
maxnames = 3, minnames = 2,
backref = true, backrefstyle = three,
arxiv = abs, doi = true]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\pertype{article}
\step[fieldset=title, null]
}
}
}
\NewBibliographyString{erratum}
\DefineBibliographyStrings{english}{
erratum = {erratum},
}
\DeclareFieldFormat{relatedstring:erratum}{\mkbibbold{#1}\printunit{\relatedpunct}}
\begin{filecontents*}{\jobname.bib}
@article{a.aad.atlas_2011_2.76_tev_jet,
author = {G. Aad and others},
title = {Measurement of the inclusive jet cross section in
$p p$ collisions at $\sqrt({s} = 2.76 \mathrm{TeV}$
and comparison to the inclusive jet cross section
at $\sqrt({s} = 7 \mathrm{TeV}$ using the ATLAS detector},
journal = {The European Physical Journal C},
year = {2013},
month = aug,
volume = {73},
number = {2509},
doi = {10.1140/epjc/s10052-013-2509-4},
}
@article{a.aad.atlas_2011_7_tev_jet,
author = {G. Aad and others},
journal = {Journal of High Energy Physics},
month = feb,
title = {Measurement of the inclusive jet cross-section
in proton-proton collisions
at $\sqrt({s} = 7 \mathrm{TeV}$
using $4.5 \mathrm{fb}^{−1}$
of data with the ATLAS detector},
volume = {02},
number = {153},
year = {2015},
doi = {10.1007/JHEP02(2015)153},
related = {a.aad.erratum_atlas_2011_7_tev_jet},
relatedtype = {erratum},
}
@article{a.aad.erratum_atlas_2011_7_tev_jet,
author = {G. Aad and others},
title = {Erratum: Measurement of the inclusive jet cross-section
in proton-proton collisions at $\sqrt{s} = 7 \mathrm{TeV}$
using $4.5 \mathrm{fb}^{−1}$ of data with the ATLAS detector},
journal = {Journal of High Energy Physics},
year = {2015},
month = sep,
volume = {09},
number = {141},
doi = {10.1007/JHEP09(2015)141},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
I will first cite \cite{a.aad.atlas_2011_7_tev_jet}, which has the erratum,
then \cite{a.aad.atlas_2011_2.76_tev_jet}.
\printbibliography
\end{document}