Skip to content

Instantly share code, notes, and snippets.

@agrede
Created April 19, 2014 07:27
Show Gist options
  • Save agrede/11076859 to your computer and use it in GitHub Desktop.
Save agrede/11076859 to your computer and use it in GitHub Desktop.
Biblatex example to cause error in biber with dynamic entries

When all citekeys are specified, dynamic citekeys are ignored. The following LaTeX example produces the effect.

For my mwe I have commented out the sections that must be changed to demonstrate the effect.

MWE

\documentclass[american]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, sorting=ydnt, subentry=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @inproceedings{key1,
    author = {Doe, John B. and Doe, Jane J.},
    title = {Designing alpha widgets for space use},
    booktitle = {Proceedings of the Acme Society 3rd Annual Conference},
    date = {2014-02-01}
  }
  @inproceedings{key2,
    author = {Doe, Jill J. and Doe, John B.},
    title = {Constructing alpha widgets for space use},
    booktitle = {Proceedings of the Acme Society 3rd Annual Conference},
    date = {2014-02-01}
  }
  @inproceedings{key3,
    author = {Doe, Jill J. and Doe, John B. and Smith, III, Arthur D.},
    title = {Benefits of alpha widgets for space use},
    booktitle = {Proceedings of the Acme Society 2nd Annual Conference},
    date = {2013-02-01}
  }
  % For Output 3:
  % @set{set1,
  %   entryset = {key1,key2}
  % }
\end{filecontents}

\addbibresource{\jobname.bib}

% \defbibentryset{set1}{key1,key2} % For Output 1 & 2

\begin{document}


% \nocite{*} % For Output 1 & 3
% \nocite{key1,key2,key3} % For Output 2

\printbibliography

\end{document}

Output

Output 1

output 1 of mwe

Here the output does not group the key1 and key2 entries as would be expected. Adding \nocite{set1} in addition to \nocite{*} (which is redundant in multiple ways) gives an warning "Citation: 'set1' undefined."

Output 2

output 2 and 3 of mwe

This performs as expected. In addition the \nocite macro can be used for any combination of (key1, key2, key3, and set1) with no warnings and the expected output. It is only when \nocite{*} is used that an error occurs.

Output 3

With the set defined statically in the .bib file, the output is identical to Output 2. Further, \nocite{*} no longer has any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment