我喜欢urlbst
处理书目中的预印本和 DOI。但是,我注意到,默认的 urlbst 书目样式都无法生成作者年份引文。每当我尝试
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\usepackage[sort, authoryear]{natbib}
\bibliographystyle{plainurl}
\setcitestyle{authoryear,open={(},close={)}}
\begin{document}
One \cite{Colmsee2015} to \cite{Ghrist2018} serve
\bibliography{foobiblio}
\end{document}
我收到以下错误
Package natbib Error: Bibliography not compatible with author-year citations. ...mand\NAT@force@numbers{}\NAT@force@numbers
如果我选择数字引用,一切都会顺利。
有没有一种快速的方法来修改plainurl.bst
,以便它支持作者年份引用?
如果需要的话,这是我的foobiblio.bib
文件
@Unpublished{Ghrist2018,
author = {Robert Ghrist and Rachel Levanger and Huy Mai},
title = {Persistent Homology and {E}uler Integral Transforms},
year = {2018},
abstract = {The Euler calculus -- an integral calculus based on Euler characteristic as a valuation on constructible functions -- is shown to be an incisive tool for answering questions about injectivity and invertibility of recent transforms based on persistent homology for shape characterization.},
archiveprefix = {arXiv},
eprint = {1804.04740},
primaryclass = {math.AT},
}
@Article{Colmsee2015,
author = {Colmsee, Christian and Beier, Sebastian and Himmelbach, Axel and Schmutzer, Thomas and Stein, Nils and Scholz, Uwe and Mascher, Martin},
journal = {Molecular Plant},
title = {{BARLEX:} the Barley Draft Genome Explorer},
year = {2015},
issn = {1674-2052},
month = {Jun},
number = {6},
pages = {964-966},
volume = {8},
day = {01},
doi = {10.1016/j.molp.2015.03.009},
groups = {Barley genomics and phenomics},
publisher = {Elsevier},
}
答案1
分布urlbst
实际上是脚本它会修改.bst
文件,并且为了方便起见,还包含了一些预先转换的 BST 文件。
这是一个 Perl 脚本(抱歉 – 那是很久以前的事了),可以像这样使用(假设您的机器上安装了 Perl):
% kpsewhich chicago.bst
/usr/local/texlive/2020/texmf-dist/bibtex/bst/chicago/chicago.bst
% ./urlbst /usr/local/texlive/2020/texmf-dist/bibtex/bst/chicago/chicago.bst chicagourl.bst
第一个命令是找出当前安装的chicago.bst
实际位置。第二个命令将该.bst
文件转换为名为 的新文件chicagourl.bst
。
如果我取你的 MWE 并替换
\bibliographystyle{chicagourl}
然后我得到:
该脚本不能保证在每个 BST 文件上都能工作 - 它是启发式的 - 但应该可以在那些或多或少与标准文件相似的文件上正常工作。