Your default sans serif font family should have a boldface slanted variant (this is the case with Latin Modern)
\usepackage{lmodern}
\DeclareMathAlphabet{\vect}{OT1}{\sfdefault}{bx}{sl}
Now $\vect{F}_{g}$
will not suffer from the problem.
It's not necessary to use Latin Modern fonts throughout; if you use the standard Computer Modern fonts, the declaration
\DeclareMathAlphabet{\vect}{OT1}{lmss}{bx}{sl}
will do.
Spacing around operators and relations in math mode are governed by specific skip lengths: \thinmuskip
(default is 3mu
), \medmuskip
(default is 4mu plus 2mu minus 4mu
) and \thickmuskip
(default is 5mu plus 5mu
). All are given in m
ath u
nits.
Here is an illustration of how a modification (setting them to 0mu
) to these lengths affect the output (I've removed the forced space after \times
):
\documentclass{article}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
\verb|Normal:| \par
Here again, four different simulations are run on networks of size
$C^{G} = 25 \times 25 = 625$, $C^{G} = 50 \times 50 = 2500$,
$C^{G} = 250 \times 250 = 62500$, and $C^{G} = 500 \times 500 = 250000$. Next,
for each network, the weights of the idiothetic connections are collected and
plotted based on radial distance, finally, they are averaged out over all
neurons and shifted and set about the centre of the graph.
\bigskip
\begingroup
\verb|\thinmuskip=0mu:| \par
\setlength{\thinmuskip}{0mu}
Here again, four different simulations are run on networks of size
$C^{G} = 25 \times 25 = 625$, $C^{G} = 50 \times 50 = 2500$,
$C^{G} = 250 \times 250 = 62500$, and $C^{G} = 500 \times 500 = 250000$. Next,
for each network, the weights of the idiothetic connections are collected and
plotted based on radial distance, finally, they are averaged out over all
neurons and shifted and set about the centre of the graph.
\endgroup
\bigskip
\begingroup
\verb|\medmuskip=0mu:| \par
\setlength{\medmuskip}{0mu}
Here again, four different simulations are run on networks of size
$C^{G} = 25 \times 25 = 625$, $C^{G} = 50 \times 50 = 2500$,
$C^{G} = 250 \times 250 = 62500$, and $C^{G} = 500 \times 500 = 250000$. Next,
for each network, the weights of the idiothetic connections are collected and
plotted based on radial distance, finally, they are averaged out over all
neurons and shifted and set about the centre of the graph.
\endgroup
\bigskip
\begingroup
\verb|\thickmuskip=0mu:| \par
\setlength{\thickmuskip}{0mu}
Here again, four different simulations are run on networks of size
$C^{G} = 25 \times 25 = 625$, $C^{G} = 50 \times 50 = 2500$,
$C^{G} = 250 \times 250 = 62500$, and $C^{G} = 500 \times 500 = 250000$. Next,
for each network, the weights of the idiothetic connections are collected and
plotted based on radial distance, finally, they are averaged out over all
neurons and shifted and set about the centre of the graph.
\endgroup
\end{document}
Grouping (\begingroup
...\endgroup
) localizes the effect of the length modification. \medmuskip
is used around binary operators (like \times
) and \thickmuskip
is used around binary relations (like =
). It's best to stick to the standard LaTeX spacing rather that insert your own.
A good source of reading material on this is Herbert Voss' mathmode document. In particular, section 11 Space (p 28 onward).
Inline math forms part of the regular text construction. That's why there is some stretch in \medmuskip
and \thickmuskip
, which allows spacing around math operators/operands to change depending on their location within the paragraph text. Removing this glue allows for a more consistent setting of inline expressions. See Keeping the distance between mathematical symbols consistent?
However, it can also have some problematic effects with regards to line breaking, as is shown below:
\documentclass{article}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
\verb|Normal:| \par
Here again, four different simulations are run on networks of size
$C^{G} = 25 \times 25 = 625$, $C^{G} = 50 \times 50 = 2500$,
$C^{G} = 250 \times 250 = 62500$, and $C^{G} = 500 \times 500 = 250000$. Next,
for each network, the weights of the idiothetic connections are collected and
plotted based on radial distance, finally, they are averaged out over all
neurons and shifted and set about the centre of the graph.
\bigskip
\begingroup
\verb|Math glue removed:| \par
\setlength{\medmuskip}{1\medmuskip}
\setlength{\thickmuskip}{1\thickmuskip}
Here again, four different simulations are run on networks of size
$C^{G} = 25 \times 25 = 625$, $C^{G} = 50 \times 50 = 2500$,
$C^{G} = 250 \times 250 = 62500$, and $C^{G} = 500 \times 500 = 250000$. Next,
for each network, the weights of the idiothetic connections are collected and
plotted based on radial distance, finally, they are averaged out over all
neurons and shifted and set about the centre of the graph.
\endgroup
\end{document}
Best Answer
OK, I produced an absolutely crazy "solution" myself. This is mostly to make clearer what the problems are; I wouldn't suggest using the (very long) code below. This "solution" only provides italic correction for single letters
A
toZ
anda
toz
, and it works by making$
active. (I could also have used\(
and\)
, but I don't like those.) Moreover, everything is adjusted "by hand" for 10pt CM fonts, so it won't work for other fonts (but should approximately work for other font sizes). Here's the output:In the 1st line you see the result of
If $U$ or $V$ ...
without any correction; in the 2nd line my correction is applied, and in the 3rd line the$
s are omitted, i.e., the usual italic font is used. I'm not claiming that the 2nd line is good on all counts, e.g. the space between "f" and "from" is rather small. What I wanted to achieve is that the spacing is just as with the "normal" italic font, that is, in the second and third lines the spacing is (almost) the same. (The 2nd line is slightly longer since the math letters are wider.)Note in particular that the spacing before punctuation in the 2nd line is different from the 1st line. (I'm not sure which version is the better one.) Clearly, the positioning of "U", "V" and "Y" in the 1st line is not good (I would say horrible); in the 2nd line it's a lot better.
Of course one could change all these numbers in my code to try and further improve the spacing. But I only wanted to point out something else: If you look at the numbers, then you see that it would be very hard indeed to have this correction "automatically" and without changing the font metrics.
--- edit ---
Here's a version of the above correction table for use with newtxtext and newtxmath.