12

I am trying to move to using biblatex with Biber rather than BibTeX. unfortunately, nearly all of my BibTeX entries have keys that include colons and parentheses. like,

@BOOK{Chambers+Hastie:(92),
  editor               = {Chambers, John M. and Hastie, Trevor J.},
  year                 = 1992,
  title                = {Statistical Models in S},
  publisher            = {Wadsworth and Brooks/Cole Advanced Books and Software},
  address              = {Pacific Grove, CA},
  annote               = {tree,glm,splus},
}

this is something Biber apparently doesn't care for. Is there a workaround that doesn't involve changing all my .bib files?

7
  • Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). Commented Feb 2, 2013 at 12:54
  • @user25395 Could you elaborate a bit on 'does not like', for example by editing in the message you see?
    – Joseph Wright
    Commented Feb 2, 2013 at 12:59
  • It seems biber doesn't like the parentheses in Chambers+Hastie:(92)
    – cgnieder
    Commented Feb 2, 2013 at 13:06
  • 1
    @user25395 It's only the parentheses. + and : don't pose a problem. You could probably make a feature request as I don't think this behaviour is intended (I could be wrong, though).
    – cgnieder
    Commented Feb 2, 2013 at 14:47
  • 1
    @user25395: biber certainly don't like the braces: You should have warnings and errors in the log-file of biber (.blg). The "+" and the ":" works fine for me. Commented Feb 2, 2013 at 14:50

1 Answer 1

16

I'm afraid the reason for this is that the library used by biber (btparse) intentionally doesn't allow this. It aims to disallow some of the more questionable bibtex constructs on purpose (see http://search.cpan.org/~ambs/Text-BibTeX-0.66/btparse/doc/bt_language.pod). Keys can't contain any of:

" # % ' ( ) , = { }

with btparse. The reason it doesn't allow parentheses is because it (and so biber) allows them to be used instead of braces, e. g.:

@BOOK(key,
...
)

As a result, it's non-trivial to modify the old PCCTS parser to fix this.

Of possible help, however, is that biber supports key aliases:

@BOOK{key,
  IDS = {key(withparens)},
  ...
}

This means you can still do \cite{key(withparens)}

You must log in to answer this question.

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