我正在使用 biblatex 包。我将所有 bibitem 都包含在一个文档中。我想先按作者 X(当他是第一作者时)、第二作者等对项目进行排序,然后按年份进行排序。有什么简单的方法吗?
更新:
以下是示例代码
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{fruits,
title = {The apple and the banana},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Straw Berry and Annoying Orange},
year = {2015}
}
@book{fruits2,
title = {The pineapple and the banana},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Annoying Orange, Straw Berry and Tom Ato},
year = {2015}
}
@book{fruits3,
title = {Thank your for your attention},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Tom Ato, Annoying Orange and Peachy Pear},
year = {2014}
}
@book{fruits4,
title = {Advance title},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Cu Cumber, Annoying Orange and Peachy Pear},
year = {2014}
}
@book{fruits5,
title = {Fancy title},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Annoying Orange and Peachy Pear},
year = {2013}
}
\end{filecontents*}
\usepackage[utf8]{inputenc}
\usepackage[backend=bibtex,maxbibnames=99,sorting=ydnt]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Hello world
\nocite{fruits,fruits2,fruits3,fruits4,fruits5}.
\printbibliography
\end{document}
其结果是:
我想要的是首先按“烦人的橙子”是第一作者的时间排序,然后按年份排序,进一步按“烦人的橙子”是第二作者的时间排序,然后按年份排序等等。
从而强调了作者身份对于特定作者的重要性。
答案1
我认为全自动解决方案不容易实现,但 regex-Biber 向导可能会让我感到惊讶。因此,此解决方案需要一些手动工作。
首先,你需要正确输入姓名列表。也就是说,所有姓名必须用 分隔and
。不要说author = {Cu Cumber, Annoying Orange and Peachy Pear},
,正确的是author = {Cu Cumber and Annoying Orange and Peachy Pear},
。请参阅如何在 bibtex 文件中正确书写多位作者?。
然后您需要添加sortname = {Annoying Orange}
到所有字段。
最后是技巧。presort = {<n>},
如果“烦人的橙子”是n第一位作者。
@book{fruits,
title = {The apple and the banana},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Straw Berry and Annoying Orange},
year = {2015},
presort = {2},
sortname = {Annoying Orange},
}
@book{fruits2,
title = {The pineapple and the banana},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Annoying Orange and Straw Berry and Tom Ato},
year = {2015},
presort = {1},
sortname = {Annoying Orange},
}
@book{fruits3,
title = {Thank your for your attention},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Tom Ato and Annoying Orange and Peachy Pear},
year = {2014},
presort = {2},
sortname = {Annoying Orange},
}
@book{fruits4,
title = {Advance title},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Cu Cumber and Annoying Orange and Peachy Pear},
year = {2014},
presort = {2},
sortname = {Annoying Orange},
}
@book{fruits5,
title = {Fancy title},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Annoying Orange and Peachy Pear},
year = {2013},
presort = {1},
sortname = {Annoying Orange},
}
然后,所有条目首先按位置排序Annoying Orange
,然后按年份排序。
平均能量损失
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{fruits,
title = {The apple and the banana},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Straw Berry and Annoying Orange},
year = {2015},
presort = {2},
sortname = {Annoying Orange},
}
@book{fruits2,
title = {The pineapple and the banana},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Annoying Orange and Straw Berry and Tom Ato},
year = {2015},
presort = {1},
sortname = {Annoying Orange},
}
@book{fruits3,
title = {Thank your for your attention},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Tom Ato and Annoying Orange and Peachy Pear},
year = {2014},
presort = {2},
sortname = {Annoying Orange},
}
@book{fruits4,
title = {Advance title},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Cu Cumber and Annoying Orange and Peachy Pear},
year = {2014},
presort = {2},
sortname = {Annoying Orange},
}
@book{fruits5,
title = {Fancy title},
publisher = {Tomatopress},
editor = {Straw Berry},
author = {Annoying Orange and Peachy Pear},
year = {2013},
presort = {1},
sortname = {Annoying Orange},
}
@book{fruits6,
title = {Very Advance title},
publisher = {Tomatopress},
author = {Cu Cumber and Peachy Pear and Annoying Orange},
year = {2015},
presort = {3},
sortname = {Annoying Orange},
}
\end{filecontents*}
\usepackage[utf8]{inputenc}
\usepackage[backend=bibtex,maxbibnames=99,sorting=ydnt]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}