# Filter by a list of bibkey on \printbibliograhy

I am currently using biblatex for creating my document. I want to know if it is possible to split the bibliography with only the bibkeys.

The idea will be to use

\printbibliography[title=Primal,key={KEY1,KEY2}]
\printbibliography[title=Complementary,notkey={KEY1,KEY2}]


KEY1 and KEY2 designate here the bibkeys associated to references. I know I can use keywords in references for filtering but I want to avoid it if possible.

The approach of filtering by entry keys is quite non-semantic and it might be possible to find a more elegant solution based on keywords, entry types or other fixed criteria instead of the arbitrary entry key. That is not to say, however, that in some cases splitting or grouping by entry key is not the best or most sensible solution.

A quite elegant solution is to use categories. Bibliography categories were meant to categorise/group entries on the fly from within the .tex document and not in the (more static) .bib data (where keywords would be the right approach).

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\DeclareBibliographyCategory{keys}

\begin{document}
\cite{sigfridsson,worman,nussbaum,geer}
\printbibliography[category=keys]
\printbibliography[notcategory=keys]
\end{document}


The less elegant brute-force methods uses bibchecks, which gets a bit messy as the lists grow, but can be more easily combined with other sorts of test.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\defbibcheck{keys}{%
\iffieldequalstr{entrykey}{sigfridsson}
{}
{\iffieldequalstr{entrykey}{nussbaum}
{}
{\skipentry}}}

\defbibcheck{notkeys}{%
\iffieldequalstr{entrykey}{sigfridsson}
{\skipentry}
{\iffieldequalstr{entrykey}{nussbaum}
{\skipentry}
{}}}