0

I am writing my cv and although I only want to print some of my @unpublished and @inproceedings entries in my bibliography, I do want to print all of my @article entries.

Is there any way in which I can \nocite all entries of a specific type (@article in this case)?

Consider that I have my entries in separate files depending on its type. Here is a MWE:

\documentclass{article}

\usepackage[backend=biber]{biblatex}

\addbibresource{articles.bib} \addbibresource{talks.bib} \addbibresource{unpublished.bib}

\begin{document}

% How do I nocite all @article entries? \nocite{<all @article entries>}

\nocite{sometalk, someothertalk}

\nocite{someunpublished, someotherunpublished}

% This should print all articles \printbibliography[title=Articles, type=article]

% This should print sometalk and someothertalk \printbibliography[title=Talks, type=inproceedings]

% This should print someunpublished and someotherunpublished \printbibliography[title=Unpublished, type=unpublished]

\end{document}

lfba
  • 731
  • 4
  • 13

1 Answers1

1

\nocite only supports listing entry keys you want to add to your bibliography or \nocite{*} to allow all available entries from your .bib file(s) to be added.

There is no way to tell \nocite to pick only @articles or entries with other properties, see \nocite{*} for single bibdatasources with biblatex/biber, Is it possible to add entries to the bibliography based on keyword using Biblatex/Biber and within the document code?.

There is, however, a workaround in newer versions of Biber that allows you to clear out entries you don't want with a sourcemap. This will result in the expected output.

You will need the starnocited keyword that was added in biblatex 3.15/Biber 2.15 (https://github.com/plk/biber/issues/319).

\documentclass{article}

\usepackage[backend=biber, defernumbers=true]{biblatex}

\DeclareSourcemap{ \maps[datatype=bibtex, overwrite]{ \map{ \pernottype{article} \step[starnocited=true, final] \step[entrynull] } } }

\addbibresource{biblatex-examples.bib}

\begin{document} \nocite{*}

\nocite{westfahl:space,gaonkar:in}

\nocite{salam} % we don't want moraux

% This should print all articles \printbibliography[title=@article, type=article]

% This should print salam but not moraux \printbibliography[title=@inproceedings, type=inproceedings]

% This should print westfahl:space gaonkar:in and nothing else \printbibliography[title=@incollection, type=incollection]

\end{document}

Part of the generated bibliography.

This clears out all entries that are not @articles that are only present because of \nocite{*} (i.e. entries that were not \cited or \nocited explicitly with their key)

moewe
  • 175,683