-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any way to make the parentheses and space be contained in bibtex entrykey? #30
Comments
Hi. I would love to be able to support that kind of things. Unfortunately btparse was written in an ancient version of Antlr (pccts at the time), and its code generation is no longer supported. We have been changing manually some details of the parser, but that doesn't allow us to quickly do changes to the code. So, while I will keep this ticket open, I do not have the time to dig on the source of the parser and try to change its behaviour. Thus, my suggestion would be to change the kind of used keys in your files. I do not see a great reason to have parenthesis or spaces on citation keys 😄 |
The problem as I remember is that the btparse parser allows normal parentheses to play the same role as curly braces and so there is no way parentheses can be in keys (just like the key can't contain curly braces). The only option is to change the parser token codes for parentheses but then this breaks the ability to use parentheses as braces, which some people might rely on. I agree that there is very little reason to use spaces/parenthesis in keys - it's very rare indeed and you will have trouble with many parsing libraries and tools anyway. |
ok,thanks, I will change the bib file which is not a hard work by using regular expressions. |
Text-BibTeX/btparse/doc/bt_language.pod Lines 141 to 144 in ff35b67
Text-BibTeX/btparse/doc/bt_language.pod Lines 175 to 177 in ff35b67
Actually the pattern of The relevant code is located at bibtex.web#L6152-L6175. This procedure calls Also note the PEG for BibTeX provided by https://github.com/aclements/biblib is worth of reference. |
Is there any way to make the parentheses and space be contained in bibtex entrykey?
hello
I am a biblatex/biber user, and encountered an error while biber was parsing the bib file, which contained entries with entriekey containing () or ' ', the biber/biblatex author told me that it was caused by btparse(biber use btparse), so I am here to ask about some improvement or measure to overcome this problem.
for an entry:
the biber output is:
and for an entry:
the biber output is:
The text was updated successfully, but these errors were encountered: