# [tex-live] Commath package + french babel

Gaspard Jankowiak gasp.janko at gmail.com
Mon Jun 6 13:38:03 CEST 2011

Hi,

I hope this is the right place to 'file' this issue, otherwise please
tell me where to do that properly.

Whenever I use the 'commath' and the 'babel' (with [french] option)
packages, pdflatex seems to enter an infinite loop whenever a colon ':'
appears in math mode.

- This happens no matter how I order the 'usepackage' commands.
- It does not happen with xelatex
- It is fixed by commenting out the 'Fix alignment of := in mathmode'
section in the commath.sty file.

This might be linked to the way double punctuation is modified by babel
in french mode (unbreakable thin space ?), but I really don't know
enough about TeX/LaTex to understand what's going on.

Any ideas ?

Regards,
G.J.

----------------------------------
The culprit section in commath.sty:

% Fix alignment of := in mathmode
\mathchardef\ordinarycolon\mathcode\:
\mathcode\:=\string"8000
\begingroup \catcode\:=\active
\gdef:{\mathrel{\mathop\ordinarycolon}}
\endgroup

Sample .tex which fails to compile with pdflatex. Uncomment the xltxtra
package to get a successful compilation with xelatex.

\documentclass{article}

%\usepackage{xltxtra}
\usepackage{commath}
\usepackage[french]{babel}

\begin{document}
$:$
\end{document}
`