[OS X TeX] Re: MacOSX-TeX Digest, Vol 35, Issue 28

Denis Chabot chabotd at globetrotter.net
Thu Sep 30 21:39:06 CEST 2010


Bonjour et merci Jean-Claude,


> Le 29 sept. 2010 à 20:55, Denis Chabot a écrit :
> 
>> 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. This is not a very good solution for me as other documents cited the same publications and will have to be updated if I change my bibtex file.
>> 
>> Do you know what might cause this?
>> 
>> Thanks in advance,
>> 
>> Denis Chabot
>> 
>> minimal example. If you use \selectlanguage{english}, it works, but if you use \selectlanguage{french}, it doesn't.
>> 
>> \documentclass[12pt]{article}
>> \usepackage[T1]{fontenc}
>> \usepackage[full]{textcomp}
>> \usepackage{txfonts} 
>> \usepackage[utf8]{inputenc} 
>> 
>> \usepackage[english,french]{babel}
>> 
>> \usepackage[round]{natbib}
>>  \bibliographystyle{plainnat}
>> 
>> 
>> \title{Bib problem}
>> \author{Denis Chabot}
>> \date{} % delete this line to display the current date
>> 
>> %%% BEGIN DOCUMENT
>> \begin{document}
>> 
>> \maketitle
>> \tableofcontents
>> 
>> \selectlanguage{english}
>> %\selectlanguage{french}
>> 
>> \section{Introduction}
>> En novembre 2004, un groupe d'experts du Ministère des Pêches et des Océans du Canada (MPO) a travaillé à établir des critères permettant d'identifier des \og{} Zones d'Importance Écologique et Biologique \fg{} (ZIEB) dans les eaux territoriales canadiennes \citep{MPO:2004kx}. Le présent document fait partie d'une série de rapports découlant de cette initiative. Ils décrivent les caractéristiques physiques, océanographiques et biologiques de l'ensemble de l'estuaire maritime et du golfe du Saint-Laurent (EMGSL) en rassemblant l'information scientifique disponible au MPO et dans la littérature afin d'identifier des zones d'importance particulière pour chacune des composantes étudiées. Il est prévu de combiner les ZIEB potentielles pour toutes les composantes et d'en faire une évaluation plus approfondie afin d'arriver à l'identification de ZIEB pour l'EMGSL.
>> 
>> 
>> 
>> \bibliography{test.bib}
>> 
>> \end{document}
>> 
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%
>> 
>> And this should be saved as "test.bib"
>> %% This BibTeX bibliography file was created using BibDesk.
>> %% http://bibdesk.sourceforge.net/
>> 
>> 
>> %% Created for Denis Chabot at 2010-09-29 12:14:53 -0400 
>> 
>> 
>> %% Saved with string encoding Unicode (UTF-8) 
>> 
>> @article{MPO:2004kx,
>> 	Author = {{MPO}},
>> 	Date-Added = {2007-01-28 08:32:02 -0500},
>> 	Date-Modified = {2010-09-29 11:01:50 -0400},
>> 	Journal = {Secr{\'e}tariat canadien de consultation scientifique du MPO, Rapport sur l'{\'e}tat des {\'e}cosyst{\`e}mes},
>> 	Title = {Identification des zones d'importance {\'e}cologique et biologique},
>> 	Volume = {2004/006},
>> 	Year = {2004}}
>> 
> 
> Bonjour Denis,
> 
> I think you have the package French from Bernard Gaulle installed (because you use french and not frenchb). So It is highly recommended to load the package Babel with French option at the end of the preamble because it uses names variables which can conflict with the package French ones.
> I did it and there are no more errors.
> For people from the list who are interested in the French typography, please note that after the death of Bernard Gaulle, his package has been updated and is now free. You can go to this page : http://www.efrench.org/ and download it.
> 
> Jean-Claude DE SOZA 

I probably have the package French, if it came with TexLive. But I did not call it with a \usepackage, so I thought it did not intervene. I saw a mention of frenchb in the babel pdf manual, but not enough to understand if the language options used when calling babel should use french, frenchb or francais. I seem to have the same result with all 3.

But your solution of loading babel later did work:

this failed:
\usepackage[english,frenchb]{babel}
\usepackage[round]{natbib}
  \bibliographystyle{plainnat}



This succeeded:

\usepackage[round]{natbib}
  \bibliographystyle{plainnat}
\usepackage[english,frenchb]{babel}

Denis
p.s. since yesterday I installed TeXLive 2010 but it did not seem to influence this behavior.


More information about the macostex-archives mailing list