I would like to print a bibliography which includes all entries with a certain keyword (and possibly some additional entries).
I know that I can filter by keyword when I print the bibliography using
\printbibliography[keyword=<keyword>]
but this will only print entries which I have cited. I could, of course, use
\nocite{*}
to add all entries to the bibliography and then print just those I want.
However, this will make my .bbl file huge as my database is enormous.
Another possibility is to use Biber or another tool to prepare a document-specific .bib file containing only those entries with the keyword. However, this would need to be recreated if additional entries with the keyword are added to my main database files.
Here's an MWE to play with, annotated to indicate the way I'd like it to work ;), and the disadvantages of the way it (almost) works.
The issue of excluding explicitly cited entries is less of an issue for me. The thing I'd really like to work around is adding the entire database contents to the .bbl.
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{new-stuff,
author = {Watt, Brian},
title = {Happy Times with Penguins},
publisher = {Harvard University Press},
address = {Cambridge, MA},
year = 1995,
pagination = {section},
keywords = {happy}}
@book{den-coll,
author = {Till, Jr., Dennis E.},
booktitle = {Penguin Land and Further North: Human Influence},
title = {Penguin Land and Further North: Human Influence},
publisher = {Oxford University Press},
year = 2008,
address = {Oxford and New York},
keywords = {penguin, human}}
@book{old-stuff,
author = {Harvey, Jr., Dennis E.},
booktitle = {Penguin Land and Further North: Human Influence},
title = {Penguin Land and Further North: Human Influence},
publisher = {Someone \& Daughters},
year = 1567,
address = {Oxford},
bookpagination = {paragraph},
keywords = {penguin}}
\end{filecontents}
\documentclass{article}
\usepackage[defernumbers=true]{biblatex}
\bibliography{\jobname}
\begin{document}
\cite{old-stuff}
% what I would like to work
% \nocite[keyword=happy]
% \printbibliography
% what does work - except that \cite{old-stuff} is ignored and, more importantly, den-coll is added to the .bbl
\nocite{*}
\printbibliography[keyword=happy]
\end{document}


keywordfiltering can only work if the entry is actually in the.bblfile, otherwisebiblatexhas no way to know about the presence or absence of akeyword. Using Biber, we can simply ignore all entries without (or with) a certain keyword (seeentrynull), of course previous\citecommands cannot help us here. – moewe Aug 05 '15 at 17:33biblatexbug report #228. – moewe Aug 05 '15 at 17:35\cite{*}and then a second round where you include a no cite for the entries with the appropriate keywords. – Guido Aug 05 '15 at 17:40\cite{*}will produce an enormous.bbl, just as\nocite{*}would. (It would let me then include additional entries, so it would have that advantage. But the main downside would be the same.) – cfr Aug 05 '15 at 20:55.bibfiles and I don't want to end up with a.bblwith 3,000+ entries just so I can filter out a couple of handfuls. I would think that keyword filtering would be very useful at the document level but perhaps I'm wrong and there's just no real demand for it. – cfr Aug 05 '15 at 21:02\printbibliographyand friends can be filtered; I would have thought this would be right up your street in this case. Of course this is an academic discussion since PLK explained that this is nearly impossible considering the way Biber andbiblatexwork. – moewe Aug 06 '15 at 04:37\nocitefiltering by bib resource rather than by content of a particular field i.e. at the resource rather than entry level? As you say, the question is unfortunately hypothetical in any case. – cfr Aug 06 '15 at 13:38\printbibliography(That's why I wrote "It might also be useful to\nociteonly entries with a particular keyword etc..") Alas, in view of the technical limitations this venture does not seem to have been born under a lucky star. – moewe Aug 06 '15 at 14:45