我目前正在整理简历,正在寻找一种自动化流程的方法。我有一个存储了 500 多个条目的中央 bibtex 数据库,我想自动导入并创建仅包含字段中包含我的名字的条目的参考书目author
。使用 biber 时,我知道可以使用\printbibliography
可选输入根据条目类型进行过滤:
\printbibliography[type=article]
\printbibliography[type=article]
是否有类似的程序允许您搜索字段author
?或者相当于以下过程:
\printbibliography[author=John Doe]
答案1
感谢大家的帮助。根据推荐的答案和一些额外的浏览,我拼凑出了一个完全符合我需求的 MWE。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=numeric,refsection=section,sorting=ydnt,
defernumbers=true,maxnames=99,doi=false,isbn=false,url=false{biblatex}
\addbibresource{biblatex-examples.bib}
%----------------Sourcemap to create keyword based on author-------------------%
%Search and replace "Knuth" and "NOTKnuth" with the desired author name
\DeclareSourcemap{
\maps[datatype=bibtex,overwrite=true]{
\map{
\step[fieldsource=author,
match=Knuth,
final]
\step[fieldset=keywords, fieldvalue=Knuth]
}
\map{
\step[fieldsource=author,
notmatch=Knuth,
final]
\step[fieldset=keywords, fieldvalue=NOTKnuth]
}
}
}
%------------------Create bib sections for numbering --------------------------%
\defbibnote{books}{}
\defbibnote{other}{}
\defbibnote{DifAuthors}{}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{% label format from numeric.bbx
\printfield{prefixnumber}%
\printfield{labelnumber}}}
\sloppy\clubpenalty4000\widowpenalty4000}
{\endlist}
{\item}
%---------------------------Begin Document-------------------------------------%
\begin{document}
\nocite{*}
\printbibliography[title={Knuth Books},prenote=books,type=book,keyword=Knuth,resetnumbers=true]
\printbibliography[title=Other,prenote=other,nottype=book,nottype=article,nottype=patent,keyword=Knuth,resetnumbers=true]
%Other authors: Just to make sure it is properly sorting the files
\printbibliography[title={DifferentAuthors},prenote=DifAuthors,type=article,keyword=NOTKnuth,resetnumbers=true]
\end{document}
它对于不同类型的文件确实很有效,并且处理了我的 500 多个参考库,所以再次感谢您的指点!