10

Can I have a bibtex entry with space in its key reference? Like below:

@article{Author 2000,
  title={Boring book},
  author={Boring Guy},
  journal={Boring Subject},
  year={2000},
  publisher={Bororing Pub.}
}

So my tex source can look like this and be recognized:

...the subject was well studied in \cite{Author 2000}.

Currently, if I run bibtex in this way I get an error:

White space in argument---line 67 of file file.aux
 : \citation{Author
 :                2000}

I understand what is the problem in this error, and I realise I can fix it going to my entries and changing it to an entry without the spacing. However, I was wondering if there was another solution.

Can I cite references containing spacing? Like \cite{Author 2000}

2
  • 5
    Neither spaces nor commas are allowed in the cotation keys. I would also stay away from non-ASCII characters.
    – Mico
    Jan 24, 2015 at 6:40
  • 2
    @Mico Indeed, BibTeX(8) only allows ASCII chars in the key. While other tools (e.g. Biber) may handle accents in the key, this is 'non-standard' and should be avoided.
    – Joseph Wright
    Jan 24, 2015 at 8:38

1 Answer 1

12

Can I have a bibtex entry with space in its key reference?

Neither spaces nor commas are allowed in the key references. (Recall that commas are the separator characters between fields in a bibtex entry.) Non-ASCII characters are not suitable either for use in key references if the bib file is processed by BibTeX(8).

Biber, which is newer than BibTeX, could in principle handle non-ASCII characters in the key reference. However, if preserving usability of the bib file with both BibTeX and Biber is an objective for you, you should definitely avoid using non-ASCII characters in the key reference.

1
  • The 5th upvote on this answer generated the overall 900th [!] badge I've received on this site!! Many thanks!!!
    – Mico
    Jul 23, 2017 at 17:28

You must log in to answer this question.

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