我用moderncv
它来创建我的简历。我想按时间顺序对出版物进行降序排序(不仅按年份,还按月份)。我在 Google 上搜索了很多解决方案,找到了一个名为 的 BiB 样式文件plainyrrev.bst
。这是链接:普通年份反转(似乎不能再用了)。但是,这种 BiB 样式文件只能按年份降序排列出版日期。同一年份的出版物并不严格按月份降序排列。在我的例子中,2013 年 3 月的出版物出现在 2013 年 10 月之前。
我正在使用multibib
包将期刊出版物与会议出版物分开。以下是 TeX 代码:
\documentclass[10pt,legalpaper,roman]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{red}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{Resum\'{e}}
\makeatletter
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
\makeatother
\usepackage{multibib}
\newcites{jrnl}{Journal papers}
\begin{document}
\makecvtitle
\section{Selected publications}
\nocitejrnl{*}
\bibliographystylejrnl{plainyrrev}
\bibliographyjrnl{journalpapers}
\renewcommand{\refname}{Conference papers}
\nocite{*}
\bibliographystyle{plainyrrev}
\bibliography{confpapers}
\end{document}
的BibTeX源码journalpapers.bib
如下:
@ARTICLE{xxd1,
author = {A and B and C},
title = {Article title 1},
journal = {Journal name},
year = {2014},
volume = {3},
pages = {1-5},
number = {2},
month = {April}
}
@ARTICLE{xxd2,
author = {A and B and C},
title = {Article title 2},
journal = {Journal name 2},
year = {2013},
volume = {1},
pages = {1-10},
number = {1},
month = {October}
}
@ARTICLE{xxd3,
author = {A and B and C and D},
title = {Article title 3},
journal = {Journal name 3},
year = {2013},
volume = {2},
pages = {2-5},
number = {2},
month = {March}
}
的BibTeX源码confpapers.bib
如下:
@INPROCEEDINGS{xxdc1,
author = {Author 1},
title = {Title 1},
booktitle = {Conference 1},
year = {2012},
pages = {1-5}
}
@INPROCEEDINGS{xxdc2,
author = {Author 2},
title = {Title 2},
booktitle = {Conference 2},
year = {2010},
pages = {9-10}
}
@INPROCEEDINGS{xxdc3,
author = {Author 3},
title = {Title 3},
booktitle = {Conference 3},
year = {2011},
pages = {30-35}
}
以下是创建的简历。所有会议论文都按年份排序,符合预期。期刊论文也按年份排序,但不按月份排序,请参阅第 2 和第 3 篇期刊论文。
我如何按年份和月份降序排列出版物? 甚至按天? 请参阅给定的链接以获取我当前使用的样式文件代码。
谢谢你!
答案1
在我看来,除了与分类程序作斗争之外,还有一种更简单的方法。
您可以使用不对 bib 文件中的条目进行排序的书目样式,例如 style unsortdin
。
然后,您可以编写您的 bib 文件并按照自己的顺序对条目进行排序:第一篇论文是最低的,您写的下一篇论文在上面,等等。论文或其他作品也一样。
例如,查看您更改后的 bib 文件:
@ARTICLE{xxd3,
author = {A and B and C},
title = {Article title April 2014},
journal = {Journal name},
year = {2014},
volume = {3},
pages = {1-5},
number = {2},
month = {April}
}
@ARTICLE{xxd2,
author = {A and B and C},
title = {Article title October 2013},
journal = {Journal name 2},
year = {2013},
volume = {1},
pages = {1-10},
number = {1},
month = {October}
}
@ARTICLE{xxd1,
author = {A and B and C and D},
title = {Article title March 2013},
journal = {Journal name 3},
year = {2013},
volume = {2},
pages = {2-5},
number = {2},
month = {March}
}
我使用包将filecontents
两个更改后的 bib 文件添加到以下 MWE 中。
最后,在 BiB 文件中进行排序比编写自己的.bst
文件或更改现有文件要容易得多。
不,您只需更改 MWE 中的 BiB 样式即可unsortdin
获得想要的结果(参见<=======
MWE 中的标记)。
梅威瑟:
\RequirePackage{filecontents}
\begin{filecontents*}{209082-journal.bib}
@ARTICLE{xxd3,
author = {A and B and C},
title = {Article title April 2014},
journal = {Journal name},
year = {2014},
volume = {3},
pages = {1-5},
number = {2},
month = {April}
}
@ARTICLE{xxd2,
author = {A and B and C},
title = {Article title October 2013},
journal = {Journal name 2},
year = {2013},
volume = {1},
pages = {1-10},
number = {1},
month = {October}
}
@ARTICLE{xxd1,
author = {A and B and C and D},
title = {Article title March 2013},
journal = {Journal name 3},
year = {2013},
volume = {2},
pages = {2-5},
number = {2},
month = {March}
}
\end{filecontents*}
\begin{filecontents*}{209082-conf.bib}
@INPROCEEDINGS{xxdc3,
author = {LastnameC, firstnameC},
title = {Title (2012)},
booktitle = {Conference 1},
year = {2012},
pages = {1-5}
}
@INPROCEEDINGS{xxdc2,
author = {LastnameB, firstnameB},
title = {Title (2011)},
booktitle = {Conference 3},
year = {2011},
pages = {30-35}
}
@INPROCEEDINGS{xxdc1,
author = {LastnameA, firstnameA},
title = {Title (2010)},
booktitle = {Conference 2},
year = {2010},
pages = {9-10}
}
\end{filecontents*}
\documentclass[10pt,legalpaper,roman]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{red}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{Resum\'{e}}
\makeatletter
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
\makeatother
\usepackage{multibib}
\newcites{jrnl}{Journal papers} % ================ needs bibtex jrnl.aux
\begin{document}
\makecvtitle
\section{Selected publications}
\nocitejrnl{*}
\bibliographystylejrnl{unsrtdin}% plainyrrev <==========================
\bibliographyjrnl{209082-journal}
\renewcommand{\refname}{Conference papers}
\nocite{*}
\bibliographystyle{unsrtdin}% plainyrrev <==============================
\bibliography{209082-conf}
\end{document}
结果: