我想在我的简历中添加一份出版物清单,我发现这个biblatex-publist
软件包提供了我想要的一切。
对于会议论文,我使用了@misc
条目。我希望条目以 开头出现year
,但我希望日期显示在条目的后面。当使用authoryear
参考书目样式时,我可以使用 来实现这一点mergedate
。
但是对于publist
样式来说,此选项似乎没有效果,它会在每个条目date=year
的开头显示完整日期。我可以使用此选项在条目开头隐藏完整日期,但之后也会在条目中省略完整日期。
有没有办法实现类似于 的mergedate
输出authoryear
?
新风:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,
bibstyle=publist,
% date=year,
mergedate=basic,
sorting=ydnt]{biblatex}
\plauthorname[Firstname][]{Lastname}
\begin{filecontents*}[overwrite]{publist.bib}
@misc{paper2012test,
author = {Lastname, Firstname},
title = {Paper title},
year = {2012},
howpublished = {Paper presented at the meeting of Organization Name, Location},
date = {2012-11-03},
keywords = {paper}
}
\end{filecontents*}
\addbibresource{publist.bib}
\begin{document}
\nocite{*}
\printbibliography[type=misc, heading=subbibliography, title={Conference Papers (selected)}]
\end{document}
答案1
默认情况下publist
用作authoryear
基本样式。因此它“继承”了该mergedate
选项。但publist
它有自己的日期处理方式,会干扰mergedate
可以执行的操作。
这是一个非常基本的方法来使类似的东西mergedate
工作。
它date=year,
通过重新定义宏来强制本地执行\printdate
,\printdateextra
然后如果我们有更详细的日期,则不要删除年份以供以后使用。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,
bibstyle=publist,
mergedate=false,
sorting=ydnt]{biblatex}
\plauthorname[Firstname][]{Lastname}
\makeatletter
\renewbibmacro*{bpl:date:makedate}{%
\begingroup
\protected\def\printdate{\csuse{mkdaterangeyear}{}}%
\protected\def\printdateextra{\csuse{mkdaterangeyearextra}{}}%
\printtext{%
\iffieldundef{year}{%
\iffieldundef{pubstate}%
{}
{%
\printfield{pubstate}%
\if@pubstateextra
\printfield{extradate}%
\fi%
}%
}{%
\iffieldundef{month}%
{\printdateextra}%
{\printdate}%
}%
}%
\endgroup
}
\renewbibmacro*{bpl:year+labelyear}{%
\iffieldundef{year}{%
\iffieldundef{pubstate}%
{\let\bbx@lasthash\undefined}%
{%
\usebibmacro{bpl:date:labeldate+extradate}%
\savefield{pubstate}{\bbx@lasthash}%
\clearfield{pubstate}%
}%
}{%
\usebibmacro{bpl:date:labeldate+extradate}%
\savefield{year}{\bbx@lasthash}%
\iffieldundef{month}
{\clearfield{year}}
{}%
}%
}
\makeatother
\begin{filecontents*}[overwrite]{\jobname.bib}
@misc{paper2012test,
author = {Lastname, Firstname},
title = {Paper title},
year = {2012},
howpublished = {Paper presented at the meeting of Organization Name, Location},
date = {2012-11-03},
keywords = {paper},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}