[Tex/LaTex] Use multiple keywords (OR) in \ printbibliography to filter the bibliography

biblatexfilterkeywords

Similarly, but slightly different from Use multiple keywords in \ printbibliography to filter the bibliography I wonder:

Is there a way to filter \printbibliography using multiple keywords that are present in the .bib file entries ?

For exemple, I'd like the command \printbibliography[keyword={key_1,key_2,key_3}] to print entries that combines at least one of the keywords from the set key_1 AND/OR key_2 AND/OR key_3.

Best Answer

Biblatex supplied a filter that works:

\defbibfilter{example}{%
    keyword=key_1 or keyword=key_2 or keyword=key_3
}

\printbibliography[filter=example, title={References}] 

Note

You can break lines in \defbibfilter like so:

\defbibfilter{example}{% 
    keyword=key_1      %  <---- This will work fine
    or keyword=key_2
    or keyword=key_3
}

You can NOT use spaces in \defbibfilter like so:

\defbibfilter{example}{% 
    keyword = key_1      %  <---- This will NOT work
    or keyword=key_2
    or keyword=key_3
}

Also, \defbibfilter doesn't need to be in preamble.