我正在使用 biblatex(后端 biber)在我的 PDF 中生成参考书目。具体来说,我有两个参考书目,一个是常规数字,另一个是具有专用 bib 环境。现在我想显示notes
特定参考书目中条目的字段,并隐藏notes
常规参考书目中的字段。现在我的问题是我不知道如何对两个不同的参考书目使用不同的字段集。我可以使用环境来做到这一点吗?bibstyle
据我所知,不可能有两个不同的设置。
谢谢你!
\documentclass[12pt,twoside,openright,a4paper,oldfontcommands]{memoir}
\usepackage[bibstyle=numeric, sorting=nty, maxnames=99, firstinits=true,
backend=biber, defernumbers=true]{biblatex}
\defbibenvironment{midbib}
{\list
{}
{\setlength{\leftmargin}{0pt}%\bibhang
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\item}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{knuth1986texbook,
title={The texbook},
author={Knuth, D.E. and Bibby, D.},
volume={1993},
year={1986},
publisher={Addison-Wesley}
}
@article{knuth1977fast,
title={Fast pattern matching in strings},
author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
journal={SIAM journal on computing},
volume={6},
number={2},
pages={323--350},
year={1977},
publisher={SIAM},
Keywords={specific},
notes = {This is an example of extensive notes.}
}
@inproceedings{knuth1970simple,
title={Simple word problems in universal algebras},
author={Knuth, D.E. and Bendix, P.B.},
booktitle={Computational problems in abstract algebra},
volume={263},
pages={297},
year={1970}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
After the following lines, the specific bibliography is printed. For every entry in this bibliography I would like to show the notes field~\cite{knuth1986texbook, knuth1977fast, knuth1970simple}.
\printbibliography[heading=none, keyword=specific, sorting=none, env=midbib]
\section{Regular bibliography}
In this regular bibliography, I would like to hide the notes field.
\printbibliography[heading=none]
\end{document}
答案1
字段名称不是note
。notes
您可以删除 bib 开头的字段:
\documentclass[12pt,twoside,openright,a4paper,oldfontcommands]{memoir}
\usepackage[bibstyle=numeric, sorting=nty, maxnames=99, firstinits=true,
backend=biber, defernumbers=true]{biblatex}
\defbibenvironment{midbib}
{\list
{}
{\setlength{\leftmargin}{0pt}%\bibhang
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\item}
\addbibresource{references.bib}
\newbool{killnote}
\AtEveryBibitem{\ifbool{killnote}{\clearfield{note}}{}}
\begin{document}
After the following lines, the specific bibliography is printed. For every entry in this bibliography I would like to show the notes field~\cite{knuth1986texbook, knuth1977fast, knuth1970simple}.
\printbibliography[heading=none, keyword=specific, sorting=none, env=midbib]
\section{Regular bibliography}
In this regular bibliography, I would like to hide the notes field.
\booltrue{killnote}
\printbibliography[heading=none]
\end{document}