I want to use the groups from my literature management tool as keywords for BibLaTeX
to create specific bibliographies for certain chapters. I managed to remap the groups field as a keywords field if an entry contains both fields, however, this seems not to work. How do I have to adjust the \DeclareSourcemap
command to make this work? Thanks in advance!
MWE:
\documentclass[a4paper,12pt]{scrartcl}
\usepackage{filecontents}
\usepackage[
backend=biber,
style=authoryear-comp,
]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=groups, fieldtarget=keywords]
}
}
}
\begin{filecontents}{sample.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
keywords = {bar},
groups = {foo}
}
@article{redwade93,
author = "George D. Redwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
groups = {foo}
}
@article{bluewade93,
author = "George D. Bluewade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
keywords = {bar}
}
\end{filecontents}
\addbibresource{sample.bib}
\begin{document}
This document contains citations of \cite{greenwade93}, \cite{redwade93} and \cite{bluewade93}---but \cite{greenwade93} doesn't appear in the first bibliography.
\printbibliography[keyword=foo,title={Bibliography One}]
\printbibliography[keyword=bar,title={Bibliography Two}]
\end{document}