Import Error for spaces in .bib citation key

I have a bib file with citation keys I want to keep which contain whitespaces. On importing using better-bibtex I get the error for those entries:

line 1, column 15: Expected ",", "=", or Optional Whitespace but "i" found.

@article{This is a citation key,
author = {John Doe},
...
}

How can I import them while keeping the keys?
Thanks!
  • I'm pretty sure comma and space are unambiguously not allowed in bibtex citekeys, so allowing import seems problematic.
  • edited June 29, 2022
    thanks, that seems to be the current state. I can see how this is bad practice, but not why it has to be like this. I converted a bibliography (bibitem) which had spaces in the keys to bibtex and now I have to change every single reference unfortunately.
  • edited June 29, 2022
    This is what bibtex itself has to say on the matter

    syntax error: found "is", expected ","

    So it would be more accurate to say

    @article{This is not in fact a citation key,
    author = {John Doe},
    ...
    }


    You should probably report this problem to the author of the program you used to export this bib file.
Sign In or Register to comment.