9

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}

  • 5
    Neither spaces nor commas are allowed in the cotation keys. I would also stay away from non-ASCII characters. – Mico Jan 24 '15 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 '15 at 8:38
10

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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