为什么 \printbibliography[keyword=key1] 没有按预期工作?

为什么 \printbibliography[keyword=key1] 没有按预期工作?
\documentclass{article}
\usepackage[backend=biber,style=ieee,sorting=ynt,defernumbers=true]{biblatex}
\addbibresource{references.bib}

\begin{document}
\section{Introduction}
\nocite{*}
\subsection*{Conference Articles}
\printbibliography[heading=none, resetnumbers,keyword={key1}]

\subsection*{Conference Abstracts}
\printbibliography[heading=none, resetnumbers,notkeyword={key1}]

\end{document}

附引文


@inproceedings{citation1,
    author = "last1 , First1",
    title = "title1",
    booktitle = "book1",
    pages = "0333",
    year = "2022",
    keyword="key1"
}

@inproceedings{citation2,
    author = "Last2, First2",
    title = "title2",
    booktitle = "book2",
    pages = "0045",
    year = "2022"
}

没有预期的输出。关键字根本无法识别。因此,第一个 \printbibliography 不打印任何内容,而第二个 \printbibliography 则打印两者。我做错了什么?

答案1

.bib 文件中的关键字应该是keywords,而不是keyword。您可以在此处放置多个关键字,因此得名。

\documentclass{article}

\begin{filecontents}{references.bib}
@inproceedings{citation1,
    author = "last1 , First1",
    title = "title1",
    booktitle = "book1",
    pages = "0333",
    year = "2022",
    keywords = "key1"
}

@inproceedings{citation2,
    author = "Last2, First2",
    title = "title2",
    booktitle = "book2",
    pages = "0045",
    year = "2022"
}
\end{filecontents}

\usepackage[
    backend=biber,
    style=ieee,
    sorting=ynt,
    defernumbers=true
]{biblatex}
\addbibresource{references.bib}

\begin{document}

\section{Introduction}
\nocite{*}

\subsection*{Conference Articles}
\printbibliography[
    heading=none, 
    resetnumbers,
    keyword={key1}
]

\subsection*{Conference Abstracts}
\printbibliography[
    heading=none, 
    resetnumbers,
    notkeyword={key1}
]

\end{document}

在此处输入图片描述

相关内容