我想使用 在我的文本中打印参考文献\fullcite{}
,而不是将此条目打印在参考书目中。我正在使用带有 biber 后端的 biblatex。
谢谢
答案1
(1)第一个选项是使用您想要从参考书目中排除的条目中的选项options
字段:skipbib
@book{knuth:ct:a,
author = {Knuth, Donald E.},
title = {The {\TeX book}},
...
options = {skipbib}
}
(2)第二种选择是做同样的事情,但不触及文件中的书目数据.bib
。这可以通过以下方式实现:
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=entrykey,
match=\regexp{knuth:ct:b},
fieldset=options,
fieldvalue={skipbib}]
}
}
}
以下 MWE 结合了这两种解决方案:
\begin{filecontents}[overwrite]{\jobname.bib}
@book{knuth:ct:a:skipbib,
author = {Knuth, Donald E.},
title = {The {\TeX book}},
date = 1984,
maintitle = {Computers \& Typesetting},
volume = {A},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
options = {skipbib}
}
\end{filecontents}
\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=entrykey,
match=\regexp{knuth:ct:b},
fieldset=options,
fieldvalue={skipbib}]
}
}
}
\begin{document}
This entry will be printed in the bibliography:\\
\cite{knuth:ct:c}
This entry will be exclulded from the bibliography:\\
\fullcite{knuth:ct:a:skipbib}
This entry will be exclulded from the bibliography:\\
\fullcite{knuth:ct:b}
\printbibliography
\end{document}