5

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
6

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`,
\def\virgoladecimale{{\virgola}}

\begin{document}     
Hallo. $(a,b)$. $(c, d)$.    
\end{document}
  • Yes, this solves the problem! It does not change the fact that "italian.ldf" should be debugged. My .cls file has dozens of such bug corrections, collected over the years, and with every texlive update I need new ones... – Motion Mountain Feb 22 '15 at 11:18
  • @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
  • It seems that the "italian" babel update of 2014 makes many people angry, if I look through stackexchange; I am puzzled that this is not listened to. The best way would be to add the "active comma" feature as an option to the italian language file, but not as a default. – Motion Mountain Feb 22 '15 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.