[tex-live] clash between babel (french), hyperref and \cite on keys with a colon character

Daniel Flipo daniel.flipo at free.fr
Mon Sep 22 17:32:54 CEST 2014


Vincent Lefevre a écrit le 22/09/2014 15:44 :

> \documentclass{article}
> \usepackage[french,english]{babel}
> \usepackage{hyperref}
>
> \begin{document}
>
> The following link does not work due to the space before the colon,
> added by babel in French:
> \selectlanguage{french}
> \cite{foo:bar} (foo:bar)
>
> The following link works:
> \selectlanguage{english}
> \cite{foo:bar} (foo:bar)
>
> \newpage
>
> \selectlanguage{english}
> \begin{thebibliography}{1}
> \bibitem{foo:bar} Foo bar.
> \end{thebibliography}
>
> \end{document}

Besides the \shorthandoff/shorthandon based workarounds already 
mentioned, you could add \usepackage{cite} in your preamble, this solves 
the issue with hyperref.

Active characters are evil, compiling with modern engines like luatex or 
xetex instead of pdftex is another option worth considering ;-)

-- 
Daniel Flipo


More information about the tex-live mailing list