# Bad horizontal spacing when using the fourier/utopia font

Consider the following MWE:

\documentclass{article}
\usepackage{fourier}
\begin{document}

If $$0<b<1$$.

\emph{If $$0<b<1$$}.

\emph{If 0<b<1}

\end{document}


that yields the following output:

As far as I can tell, the horizontal spacing between the f and 0 in the second case is not optimal. Is it a feature, bug or misuse on my side?

## Edit:

In case it is a "feature" (as @Mico suggests), how can I solve it globally? I have something like If $$0<b<1$$ inside theorem-environment, thus the italic and I am looking for a way out that won't involve manual fix.

• I might diagnose the problems exhibited by the second case as follows: LaTeX is in (text-)italic mode, but it doesn't know that it should be inserting an italic correction after "If" because it doesn't "know" that the first item inside the math mode part (0) is set in an upright font. I'm not sure I'd call it a bug; really more of a feature. If you really need to typeset the second case, you should provide an explicit italic correction, viz., write \emph{If\/ $$0<b<1$$}. – Mico Jan 13 '14 at 10:23
• It seems like you're right. If I remove the fourier package, then a similar issue arises, only it is not as visible as when utopia is in use. – Dror Jan 13 '14 at 10:31
• Or, \emph{If} $0<b<1$, which should insert the italic correction automatically. – morbusg Jan 13 '14 at 12:04
• See my edit, the problem is that I have this issue inside an environment. – Dror Jan 13 '14 at 12:05
• Ah, gotcha. AFAIK, there's no (reasonably easy) way to make it work automagically. – morbusg Jan 13 '14 at 12:08

The mathtools package provides the option mathic=true for inserting such italic corrections automatically:

\documentclass{article}

\usepackage{fourier,mathtools}

\begin{document}

If $$0<b<1$$.

\emph{If $$0<b<1$$}.

\emph{If 0<b<1}.

\mathtoolsset{mathic=true}
\emph{If $$0<b<1$$}.

\emph{If 0<b<1}.

\end{document}

• Is it safe/advisable to turn this mathic on globally? – Dror Jan 13 '14 at 14:59
• @Dror I use it globally in my documents. Recent updates to mathtools means that these operations are robust, so this may be used in captions and index entries. Note that you have to use $$...$$ rather than $...$ for the maths. – Andrew Swann Jan 14 '14 at 7:25
• Does "Globally" mean that you have the line mathtoolsset{mathic=true} right after the \begin{document} or in the preamble? – Dror Jan 14 '14 at 13:14
• @Dror in the preamble. – Andrew Swann Jan 14 '14 at 13:34