When I am trying to compile my document I get the following error ! Missing \endcsname inserted. if there's a ":" in my cite key. This is my MWE:

Blablablabla \citep{Organization:2003aa}.

The error only appears when the bibdex cite key contains ":" if I replace the ":" by a dash it works fine. The bst file I used was customized by myself last year, I used it for another paper it worked fine.

Thanks in advance for your help.

  • 4
    It's a known problem: with the French babel language colons are treated in a way that makes them problematic in \cite keys.
    – egreg
    Aug 27 '13 at 17:00
  • 1
    Duplicate? tex.stackexchange.com/q/89016/586 Aug 27 '13 at 17:01
  • the problem is not that the citation is not found it tells me "! Missing \endcsname inserted." by the way I will remove french babel. It's weird, I think in the previous document I wrote I used it as well and it didn't cause any error.
    – esmitex
    Aug 27 '13 at 17:15
  • 1
    If I remove the babel package, I cannot use french quotes anymore and I get a bunch of errors linked to the fact that I am using french in the document and adding \shorthandoff{:} in my preamble didn't fix the problem.
    – esmitex
    Aug 27 '13 at 17:17

The problem is that the commands \cite and friends don't activate any protection about colons when the language is French, where the colon has a special meaning.

Workaround: modifying what \NAT@sort@cites does

 author={A. U. Thor},




Blablablabla \citep{x:y}.

Note that filecontents* is just to provide a self contained example.

Note also that it's useless to load both francais and french, which do the same thing and may confuse babel. In general I prefer utf8 to utf8x. Loading ucs is not legal with the utf8 option; it's unnecessary with the utf8x option, unless some option is passed to it, in which case it should be loaded before inputenc.

  • OK I took off the french and "ucs". I use utf8x because with utf8 you have to write accents like \'eand it is kind of time consuming in french. I will try what you just told me.
    – esmitex
    Aug 27 '13 at 19:18
  • @esmitex You can also with utf8.
    – egreg
    Aug 27 '13 at 19:26
  • Usually when I do with "utf8" only it triggers some error and I have to place \'e
    – esmitex
    Aug 27 '13 at 22:41

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.