[OS X TeX] Re: problem with citation keys when writing in French

André Valentin ajj47.valentin at orange.fr
Thu Sep 30 16:04:14 EDT 2010


Bonjour Denis,

On Sep 29, 2010, at 1:55 PM, Denis Chabot wrote:

> Dear Mac LaTeX users,
> 
> Sorry, I should really post this on a general LaTeX list, but I'll try here first since I already subscribe.
> 
> I wrote a document in 2007 that formatted properly with whatever version of TexLive or gwtex that was typical at the time.
> 
> I made minor corrections and was hoping that producing the updated pdf would be a piece of cake, but I ran into a strange problem with TeXLive 2009.
> 
> The document is written in French and I use babel. For the bibliography, I use natbib. Some citation keys in my references contain a ":", such as Fraley:2007 or MPO:2004kx.
> 
> The document was compiled without problem in 2007, but now gives me this:
> 
> Missing \endcsname inserted.
> <to be read again> 
>                  \unskip 
> l.146 ...ritoriales canadiennes \citep{MPO:2004kx}
>                                                 . Le présent document fai...
> 
> ? 
> 
> Yet, if I put
> \selectlanguage{english} 
> 
> there is no problem. If I change my citation key to remove the ":", the problem disappears also. 
[...]

You should look at the documentation for babel: 

type "texdoc babel"

in a terminal window and search  "\shorthandon" and "\shorthandoff".

Before using (:) in a citation key, you must say "\shorthandoff{:}"
and after that "\shorthandon{:}".
So it would be better to avoid ":" in a citation key in french :-)

You will  have the same problem with tikz where you should say "\shorthandon/off{:;!}" before/after a tikzpicture environment.
(I don't remember the exact list of active characters {:;! and so on }) which can conflict with tikz.

A. Valentin




More information about the MacOSX-TeX mailing list