有没有办法用基于关键字的星号突出显示书目发布列表中的特定条目?

有没有办法用基于关键字的星号突出显示书目发布列表中的特定条目?

我想知道是否可以用星号突出显示某些书目条目,以指示某些关键字的存在(例如,简历中受邀与未受邀的条目)。我正在准备一份学术简历以供晋升,我希望在各种活动列表中采用统一的风格,以指示受邀与未受邀的工作。

我看到了一些解决方案,这里,但它们对我来说不起作用,因为我正在使用 Zotero 创建 .bib 文件,所以我无法浏览并在一堆条目中添加星号字段。谢谢。,

\documentclass{article}
\usepackage[style=publist]{biblatex}


\begin{filecontents}{\jobname.bib}

@book{key,
  author = {Author, A.},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
  keyword={peerreviewed}
}

@misc{key2,
  author = {Author, B.},
  year = {2002},
  title = {Title2},
  keywords={guestlecture, invited}
}

@misc{key3,
  author = {Author, C.},
  year = {2003},
  title = {Title3},
  keywords={guestlecture}
 
}

\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}

\nocite{*}

\printbibliography[title={Books}, type={book}]

\printbibliography[title={Guest Lectures}, type={misc}, keyword={guestlecture}, notkeyword={invited}]

\printbibliography[title={Guest Lectures}, type={misc}, keyword={guestlecture}, keyword={invited}]

\end{document}

答案1

假设您想要对参考书目的数字标签进行修改,您可以通过修改打印来实现,labelnumber具体取决于invited关键字是否存在。

对于 MWE:

\begin{filecontents}{\jobname.bib}
@book{key,
  author = {Author, A.},
  year = {2001},
  title = {Title},
  publisher = {Publisher},
  keyword={peerreviewed}
}

@misc{key2,
  author = {Author, B.},
  year = {2002},
  title = {Title2},
  keywords={guestlecture, invited}
}

@misc{key3,
  author = {Author, C.},
  year = {2003},
  title = {Title3},
  keywords={guestlecture}
 
}
\end{filecontents}


\documentclass{article}
\usepackage[style=publist]{biblatex}

% Relevant line below
\DeclareFieldFormat{labelnumber}{\ifkeyword{invited}{*#1}{#1}}

\addbibresource{\jobname.bib}
\begin{document}

\nocite{*}

\printbibliography[title={Books}, type={book}]

\printbibliography[title={Guest Lectures}, type={misc}, keyword={guestlecture}, notkeyword={invited}]

\printbibliography[title={Guest Lectures}, type={misc}, keyword={guestlecture}, keyword={invited}]

\end{document}

在此处输入图片描述


您所链接问题的已接受答案也可以修改为使用关键字invited。MWE(与\jobname.bib上面相同,因此为了节省空间我省略了它):

\documentclass{article}
\usepackage[style=publist]{biblatex}

\renewbibmacro{begentry}{%
  \ifkeyword{invited}
    {*\addspace}
    {}%
}

\addbibresource{\jobname.bib}
\begin{document}

\nocite{*}

\printbibliography[title={Books}, type={book}]

\printbibliography[title={Guest Lectures}, type={misc}, keyword={guestlecture}, notkeyword={invited}]

\printbibliography[title={Guest Lectures}, type={misc}, keyword={guestlecture}, keyword={invited}]

\end{document}

这会将星号作为条目的第一个字符。

在此处输入图片描述

相关内容