Skip to content
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

Braces in citekey #150

Open
mapreal19 opened this issue Jul 12, 2021 · 2 comments
Open

Braces in citekey #150

mapreal19 opened this issue Jul 12, 2021 · 2 comments

Comments

@mapreal19
Copy link
Collaborator

When a citekey has braces the parser can't handle it. Maybe we should strip them when processing?

The example bibtex I've got:

@book{book:{421090},
  title = {Fuzzy Reasoning in Information...)},
  author = {S.G. Tzafestas, Anastasios N. Venetsanopoulos},
}

Error

 BibTeX::ParseError:
       Failed to parse BibTeX on value "{" (LBRACE) ["@", #<BibTeX::Entry >, "book:"]
     # bibtex.y:138:in `on_error'
     # (eval):3:in `_racc_do_parse_c'
     # (eval):3:in `do_parse'
     # bibtex.y:111:in `parse'

Using the latex filter produces the same result.

@inukshuk
Copy link
Owner

I don't remember if BibTeX itself allows such keys, but I vaguely remember that we already made changes in the past to be less strict with the key syntax, so we can probably do the same here. If I'm not mistaken you'd just have to change the lexer pattern for keys here. You can probably test this at runtime even by adjusting BibTeX::Lexer.defaults or passing the options to Bibliography.parse which, I think, passes them through all the way to the lexer instantiation.

@mapreal19
Copy link
Collaborator Author

ok! I'll try to make the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants