
我正在使用 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
我認為全自動解決方案不容易實現,但正規表示式-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-th 作者。
@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}