2

How can I make BibLaTeX cite any entry that contains string "foo" as part of the citekey, e.g., how can I quote twenty articles by "Sexton", each of which begin with {sextonyy}. I tried to use \nocite{sexton*}, however it appears that * is interpreted not as a regular expression but simply as a normal character.

2
  • 3
    You can't. Either you cite all entries with \nocite{*} or you cite specific entries with \nocite{name}. Depending on your exact requirements a work-around may be available. But you would have to tell us more about what you want and your general setup.
    – moewe
    Commented Jun 9, 2018 at 13:47
  • Related, but not the same, because your question would be easier to solve from a Biber perspective tex.stackexchange.com/q/258888/35864
    – moewe
    Commented Jun 9, 2018 at 13:50

1 Answer 1

5

You can either add all entries Biber/BibTeX can find in all declared and available data sources (.bib files) to the bibliography with \nocite{*} or you can add specific entries with \nocite{<entrykey>}.

You can not perform pattern matching on the keys and you can not \nocite entries by certain properties (see Is it possible to add entries to the bibliography based on keyword using Biblatex/Biber and within the document code? - of course I mean you can't do these things with Biber, see also \nocite{*} for single bibdatasources with biblatex/biber and https://github.com/plk/biblatex/issues/228, https://github.com/plk/biblatex/issues/186).

I imagine your request (selecting entries via pattern matching on their entry key) would be slightly easier to achieve than selecting entries for properties that go beyond their entry key. After all, you don't have to parse the entire entry to match the key, and the entry key is something Biber needs to look for anyway to decide if the entry was requested or not. So you could add a feature request for Biber https://github.com/plk/biber/issues if you think it is useful. But don't be surprised if it turns out that even pattern matching on entry keys is much harder than I though. Plus I don't know if such a feature request would have very high priority. It seems quite a niche requirement and allowing for pattern matching on entry keys might encourage people to see more into the key than they should. The key is just an internal name for the entry, ideally it should be easy to remember and unique, so that humans can use it effectively, but it should not be more than that.


That said, you will have noticed that the questions I linked have answers. So in certain situations it is certainly possible to work around the current limitations of the \nocite{*}/\nocite{<entrykey>} mechanism. But note that none of them can be fully equivalent to what you want. A solution might come close enough to be of use for you, but it will not be exactly what you ask for.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .