Consider the following:
\documentclass{article}
\usepackage[backend=bibtex8]{biblatex}
\begin{filecontents*}{bib.bib}
@mastersthesis{toto,
author={Toto},
title={My thesis},
year={2009},
school={Paris 129},
keywords={mem}
}
\end{filecontents*}
\addbibresource{bib.bib}
\newtoggle{display}
\toggletrue{display}
\begin{document}
\nocite{*}
\printbibliography[\iftoggle{display}{keyword=mem}{notkeyword=mem}]
\togglefalse{display}
\printbibliography[\iftoggle{display}{keyword=mem}{notkeyword=mem}]
\end{document}
The behavior I would expect is that depending of the value of the toggle display, the entries with the keyword mem would be displayed or not.
However, all I get is ! Package keyval Error: keyword=mem undefined. and ! Package keyval Error: notkeyword=mem undefined. errors.


bibtexor packagebiblatex? – Johannes_B Feb 15 '15 at 19:02\addbibresourcemust be in the preamble – Feb 15 '15 at 19:02biblatexand\addbibressourceat the right place. – Clément Feb 15 '15 at 19:22\iftoggle{display}{\printbibliography[...]}{\printbibliography[...]}not be easier? – Feb 15 '15 at 19:23printibliographycommand is long, so it is not very handy to copy/paste it every time I want to change it, and 2° I'd like to understand that error! – Clément Feb 15 '15 at 19:29