2

Is it possible to have a kerning reconfiguration in the preamble to allow a small amount of whitespace for specific letters.

In this example, I would want right space to the right of g and f when used as an italic in an equation.

Minimal Example, compiled using xelatex

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathspec}
\setallmainfonts{Adobe Minion Pro}
\usepackage{MnSymbol}
\let\mathdollar\relax
\usepackage{lipsum}  

\begin{document}
\lipsum[1]
\begin{equation*}
    \begin{aligned}
        \delta n_a &= \delta \left( \frac{\epsilon \partial_a f}{ \sqrt{g^{bc} \partial_b f \partial_c f }} \right) \\
        &= -\frac{1}{2} n_\mu \delta g^{bc} g_{bc} \\
        &= \frac{1}{2} \epsilon n_a n^b n^c \delta g_{ab} \qquad \qquad \epsilon n_a n^c = g^c_a - \gamma^c_a \\
        &= \frac{1}{2} n^b \delta g_{ab} + c_b \qquad \qquad c_b = -\frac{1}{2} \gamma^c_a \delta g_{bc} n^b 
    \end{aligned}
\end{equation*}
\lipsum[1]
\end{document}

Screenshot as an example

enter image description here

Edit

Included regular text around screenshot to show kerning of body text and included code of a minimal example

4
  • Please tell which math and text fonts, which document class, and which TeX engine (pdftex, detective, luatex, or something else?) you employ. Please also show the code that gave rise to the screenshot you posted. Thanks.
    – Mico
    Apr 1, 2020 at 14:45
  • To me it seems the overall kerning in this font setup is really bad. As Mico says we need more information.
    – daleif
    Apr 1, 2020 at 14:49
  • @Mico Sorry for neglecting more information, I have updated the post Apr 1, 2020 at 14:58
  • mathspec has its own method for specifying a kern in these cases with "
    – egreg
    Apr 1, 2020 at 15:57

1 Answer 1

2

There's no automatic way, sorry. The author of mathspec explains why. The reason is that basically mathspec is a kludge.

You can use " in appropriate places, though. For more information look in the manual.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathspec}
\setallmainfonts{Minion Pro}
\usepackage{MnSymbol}
\let\mathdollar\relax
\usepackage{lipsum}  

\begin{document}
\lipsum[1]
\begin{equation*}
\begin{aligned}
\delta n_a
&= \delta \left(
     \frac{\epsilon \partial_a "f}{ \sqrt{"g^{bc} \partial_b "f \partial_c "f }}
   \right) \\
&= -\frac{1}{2} n_\mu \delta "g^{bc} g_{bc} \\
&= \frac{1}{2} \epsilon n_a n^b n^c \delta g_{ab}
   && \epsilon n_a n^c = g^c_a - \gamma^c_a \\
&= \frac{1}{2} n^b \delta g_{ab} + c_b
   && c_b = -\frac{1}{2} \gamma^c_a \delta g_{bc} n^b 
\end{aligned}
\end{equation*}
\lipsum[1]
\end{document}

enter image description here

1
  • Thank you for expanding on your comment. This is really helpful. I'm trying (and failing atm) to install MinionPro as a package, which has some kerning fixes apparently. If that doesn't work, this work around with " might be sufficient Apr 1, 2020 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .