# Math comma issue with babel and MinionPro/MinionMath: typeset as an inverted E

The following code typesets an inverted E instead of the math comma on my system (texlive 2014, OSX)

\documentclass{book}

\usepackage[T1]{fontenc}
\usepackage[onlytext]{MinionPro}
\usepackage{minionmath}
\usepackage[italian,british]{babel}

\begin{document}
Hallo. $(a,b)$. $(c, d)$.
\end{document}


All the mentioned commands seem necessary; without "italian", there is no problem; there is also no problem if "minionmath" is taken out. (The "british" can be taken out, though, and the problem still remains.) Can anybody help here?

P.S. It seems that adding \usepackage{icomma} after the babel command "sort of" solves the problem; but then I would have to go through thousands of commas in my files and check whether there is a space after them. That is not feasible...

• The Italian module for babel adds code for an “intelligent comma” (which I don't agree with). The code for this purpose is not really robust, because it assumes that the comma is in the letters math symbol font, at slot "3B, which is probably changed by minionmath. – egreg Feb 22 '15 at 10:31
• Greg, it is a pity, but it does not help. Neither does \AtBeginDocument{\mathcode,=\virgola} which switches the active comma off. – Motion Mountain Feb 22 '15 at 11:06
• Just for completeness: in my comment I was referring to egreg's original suggestion (now deleted) to use \NoIntelligentComma - it does not work. The correct answer is below. – Motion Mountain Feb 22 '15 at 11:27

There is wrong code in italian.ldf: such code is wrong because it relies on the mathcode of the comma being the same as in the standard setting, which is not the case when minionmath is used. Indeed the standard math code for the comma is "613B, which becomes "622C with minionmath.

The consequence is that \virgola and \virgoladecimale point to a random character.

You should be able to fix the problem with a hack: define \virgola to point to the correct mathchar (after loading minionmath) and \virgoladecimale to be the same character, but made into an Ordinary atom with braces.

\documentclass{book}

\usepackage[T1]{fontenc}
\usepackage[italian,british]{babel}

\usepackage[onlytext]{MinionPro}
\usepackage{minionmath}

\mathchardef\virgola=\mathcode,
Hallo. $(a,b)$. $(c, d)$.

• @MotionMountain I tried to convince Claudio Beccari that code of that kind is out of place in a language definition file (the same is for \unit, \ap and \ped), without success. That code should be in a package to be loaded late (after font settings), so it can do its job in a safe way. – egreg Feb 22 '15 at 11:20