Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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 ({}). –  Claudio Fiandrino Feb 2 '13 at 12:54
    
@user25395 Could you elaborate a bit on 'does not like', for example by editing in the message you see? –  Joseph Wright Feb 2 '13 at 12:59
    
It seems biber doesn't like the parentheses in Chambers+Hastie:(92) –  cgnieder Feb 2 '13 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 Feb 2 '13 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. –  Ulrike Fischer Feb 2 '13 at 14:50
show 2 more comments

1 Answer

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:

@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)}

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.