sebschub / FontPro

LaTeX support for Adobe's Pro opentype fonts: Minion Pro, Myriad Pro, Cronos Pro and possibly more
231 stars 43 forks source link

Incompatibility between Babel (french) and Myriad mathversion{sans} #53

Closed felix-rose closed 8 years ago

felix-rose commented 8 years ago

If I try to load sans math using MyriadPro's mathversion command, I encounter an error. A mwe is

\documentclass{article}

\usepackage[french]{babel}
\usepackage[sansmath]{MyriadPro}

\begin{document}
\mathversion{sans}
$2+2=4$
\end{document}

This produces the following error message:

! File ended while scanning use of @for.

The error is specifically caused by the french babel package. Calling \usepackage[english]{babel} does not trigger an error, nor using $\mathsf{2+2=4}$ instead of using mathversion.

sebschub commented 8 years ago

In mdsymbol, with option sansmath of MyriadPro, some math symbols are made active so that they automatically adjust to the active math version. babel makes ":" a shorthand with the french option, which produces errors. The following works:

\documentclass{article}

\usepackage[french, shorthands=;?!]{babel}
\usepackage[sansmath]{MyriadPro}

\begin{document}
\mathversion{sans}
$2+2=4$
\end{document}

Here, the ":" is not made a shorthand.

felix-rose commented 8 years ago

Thanks, it works. Also, it does not seem to have an adverse effect on kerning with ":" with babel.