Biblatex - How can I suppress some fields for multiple entry types?
Apparently the rules have to be defined on an per-type-basis so the answer is: not possible.
Output
MWE
\documentclass{article}
\usepackage[
style=authoryear-icomp
]{biblatex}
\AtEveryBibitem{%
\ifentrytype{book}{
\clearfield{url}%
\clearfield{urldate}%
\clearfield{review}%
\clearfield{series}%%
}{}
\ifentrytype{collection}{
\clearfield{url}%
\clearfield{urldate}%
\clearfield{review}%
\clearfield{series}%%
}{}
\ifentrytype{incollection}{
\clearfield{url}%
\clearfield{urldate}%
\clearfield{review}%
\clearfield{series}%%
}{}
}
%%%%not working:
%%%\AtEveryBibitem{%
%%%\ifentrytype{book,collection,incollection}{%supresses the fields for those entrytypes
%%% \clearfield{url}%
%%% \clearfield{urldate}%
%%% \clearfield{review}%
%%% \clearfield{series}%
%%%}{}%the other entrytypes are nore affected
%%%}
\usepackage{filecontents}
\begin{filecontents}{test-lit.bib}
@book{Abook,
author = {AAAAbook, A.},
year = {2001},
title = {Alpha},
url = {tex.stackexchange.com},
}
@online{Bonline,
author = {BBBBonline, B.},
year = {2002},
title = {Bravo},
url = {tex.stackexchange.com},
}
@collection{Ccollection,
editor = {CCCCColletionEditor, C.},
year = {2002},
title = {Charlie},
url = {tex.stackexchange.com},
}
@incollection{Dincollection,
author = {DDDDincollection, D.},
year = {2002},
crossref = {Ccollection},
title = {Delta},
url = {tex.stackexchange.com},
}
\end{filecontents}
\addbibresource{test-lit.bib}
\nocite{*}
\listfiles
\begin{document}
Abc.
\printbibliography
\end{document}
\ifentrytype{book,collection,incollection}{%supresses the fields for those entrytypes
\clearfield{url}%
\clearfield{urldate}%
\clearfield{review}%
\clearfield{series}%
}{}%the other entrytypes are nore affected
UPDATE: as the other answer tells us, \ifentrytype
only works with ONE entrytype as its argument.