我有两篇由同一作者在同一年撰写的论文的参考文献。当我引用它们时,我看到类似这样的内容[Landgren et al., 2016a]
和[Landgren et al., 2016b]
。问题是带有 的论文2016a
是在带有 的论文发表几个月后发表的2016b
,实际上2016a
是 的后续论文2016b
。我怎样才能让 latex 交换两篇论文的顺序,以便较早的论文标有2016a
?我已经在 .bib 文件中指定了月份,但这并没有改变任何东西。
编辑
最小 bibtex:
@inproceedings{landgren2016distributed,
title={On distributed cooperative decision-making in multiarmed bandits},
author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
booktitle={Control Conference (ECC), 2016 European},
pages={243--248},
year={2016},
month={may},
organization={IEEE}
}
@inproceedings{landgren2016bdistributed,
title={Distributed cooperative decision-making in multiarmed bandits: Frequentist and Bayesian algorithms},
author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
booktitle={Decision and Control (CDC), 2016 IEEE 55th Conference on},
pages={167--172},
year={2016},
month={sep},
organization={IEEE}
}
主要文本
\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{apalike}
\bibliography{refs.bib}
\end{document}
答案1
您可以修复此问题而无需更改 bst 文件(如果您提交的论文符合所需的 bib 样式,则会让编辑人员感到满意apalike
)。当两个条目共享相同的作者列表时,排序顺序由标题决定。
\begin{filecontents*}{\jobname.bib}
@inproceedings{landgren2016distributed,
title={{\noopsort{A}{On}} distributed cooperative decision-making in multiarmed bandits},
author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
booktitle={Control Conference (ECC), 2016 European},
pages={243--248},
year={2016},
month=may,
organization={IEEE}
}
@inproceedings{landgren2016bdistributed,
title={{\noopsort{B}{Distributed}} cooperative decision-making in multiarmed bandits: Frequentist and Bayesian algorithms},
author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
booktitle={Decision and Control (CDC), 2016 IEEE 55th Conference on},
pages={167--172},
year={2016},
month=sep,
organization={IEEE}
}
\end{filecontents*}
\documentclass{article}
\newcommand{\noopsort}[2]{#2}
\begin{document}
\nocite{*}
\bibliographystyle{apalike}
\bibliography{\jobname}
\end{document}
这样,BibTeX 就根据 A 和 B 进行排序,而不是根据 On 和 Distributed 进行排序。
我filecontents*
只是为了使示例独立起来而使用的。
答案2
经过一些修改,apalike.bst
您可以按年份和月份排序。这将要求您输入三个字母的月份缩写无括号, 尽管
month = may,
建议btxdoc
无论如何(第 10 页)
month
作品出版的月份,或未出版作品的创作月份。您应该使用标准的三个字母的缩写,如 LaTeXbook 附录 B.1.3 所述。
修改apalike.bst
步骤如下。
apalike.bst
在您的机器上找到。您可以通过kpsewhich apalike.bst
在命令行/终端中输入来执行此操作。或者,从 CTAN 获取该文件的副本http://mirrors.ctan.org/biblio/bibtex/base/apalike.bst将文件复制到 TeX 可以找到的位置。文档目录就可以了。另请参阅https://texfaq.org/FAQ-inst-wlcf
将文件重命名为
apalike-month.bst
(许可证apalike.bst
要求您在修改文件时更改名称)应用以下补丁中给出的更改
--- apalike.bst 2010-12-10 10:19:51.000000000 +0100 +++ apalike-month.bst 2018-06-25 14:10:59.653275200 +0200 @@ -1,7 +1,8 @@ -% BibTeX `apalike' bibliography style (version 0.99a, 8-Dec-10), adapted from +% BibTeX `apalike-month' bibliography style +% based on `apalike' (version 0.99a, 8-Dec-10), which in turn was adapted from % the `alpha' style, version 0.99a; for BibTeX version 0.99a. % -% Copyright (C) 1988, 2010 Oren Patashnik. +% original copyright (C) 1988, 2010 Oren Patashnik. % Unlimited copying and redistribution of this file are permitted as long as % it is unmodified. Modifications (and redistribution of modified versions) % are also permitted, but only if the resulting file is renamed. @@ -39,6 +40,7 @@ % THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i. % 8-dec-10 (OP) Still version 0.99a, as the code itself was unchanged; % this release clarified the license. +% 25-jun-18 Add month sorting ENTRY { address @@ -51,7 +53,7 @@ institution journal key -% month not used in apalike + month note number organization @@ -751,29 +753,29 @@ FUNCTION {default.type} { misc } -MACRO {jan} {"January"} +MACRO {jan} {"01"} -MACRO {feb} {"February"} +MACRO {feb} {"02"} -MACRO {mar} {"March"} +MACRO {mar} {"03"} -MACRO {apr} {"April"} +MACRO {apr} {"04"} -MACRO {may} {"May"} +MACRO {may} {"05"} -MACRO {jun} {"June"} +MACRO {jun} {"06"} -MACRO {jul} {"July"} +MACRO {jul} {"07"} -MACRO {aug} {"August"} +MACRO {aug} {"08"} -MACRO {sep} {"September"} +MACRO {sep} {"09"} -MACRO {oct} {"October"} +MACRO {oct} {"10"} -MACRO {nov} {"November"} +MACRO {nov} {"11"} -MACRO {dec} {"December"} +MACRO {dec} {"12"} MACRO {acmcs} {"ACM Computing Surveys"} @@ -1013,6 +1015,13 @@ * " " * + month empty$ + { "00" } + { month } + if$ + * + " " + * title field.or.null sort.format.title * @@ -1072,6 +1081,13 @@ * " " * + month empty$ + { "00" } + { month } + if$ + * + " " + * title field.or.null sort.format.title *
此补丁重新启用了该
month
字段并将其字段纳入排序序列(如果没有month
指定,则按如下方式排序,00
这样没有明确月份的排序将优先于有明确月份的排序,当然可以通过将两个"00"
s 替换为所需的排序字符串来更改)。为了确保月份排序正确,重新定义了三个字母的宏以产生月份数字。请注意,样式并未更改为打印月份(因此从外部来看排序可能感觉有些随意)。在您的文档中使用
\bibliographystyle{apalike-month}
而不是。\bibliographystyle{apalike}
作为步骤 1 至 4 的替代方案,您可以在以下位置获取该文件的修补版本https://gist.github.com/moewew/432f756b9fbb81d6337577cd78a8bbd8
有了新的apalike-month.bst
MWE 提供