Here's a MWE that I thought it would only remove entries without the annotation
AKA annote
field. But actually it removes all of the entries.
Here's what the documentation says, on page 78 of the biblatex manual:
If
notfield
is used then only apply the step if the ⟨entryfield⟩ does not exist.If
entrynull
is set, processing of the\map
immediately terminates and the current entry is not created. It is as if it did not exist in the datasource. Obviously, you should select the entries which you want to apply this to using prior mapping steps.
By wrapping these into one step I thought I would first test if the annotation field is set, and then, if not, delete the entry. Is there a way to achieve that.
\documentclass{article}
\usepackage[style=reading,
entryhead=true,
entrykey=false,
natbib,
hyperref=false,
url=false,
doi=false,
%style=apa,
sorting=nyt,
isbn=false,
%backref=true,
firstinits=true,
minnames=13,
maxnames=35,
minbibnames=10,
maxbibnames=100,
parentracker=true,
defernumbers=true,
backend=biber]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[notfield=annotation,entrynull=true]
}
}
}
\begin{filecontents}{\jobname.bib}
@inproceedings{ABCDFG,
annote = {This is a very nice paper.},
author = {GGPB},
booktitle = {BOEUS},
keywords = {clipping},
title = {NOAP},
volume = {0},
year = {2005},
}
@inproceedings{XXXXXX,
author = {PQR},
booktitle = {BBC},
keywords = {LLM},
title = {ARP},
year = {2010},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
entrynull
to me.\step[notfield=annote, fieldset=note, fieldvalue=Note]
works as expected. Note: You should useannote
as is actually in your bib file, notannotation
as this mapping isn't yet applied at the time your user mapping.