0

I have a rather elaborate font setup in a larger document, were I recently noticed some funny spacing with greek letters and subscripts in mathmode.

showcasing the issue

I verified on a MWE (below) that it's not cmap, microtype, or even lato (why should it ever?). The culprit seems to be mathdesign. I have a sort-of-fix with a sledgehammer – use negative space where it feels right, but this is impossibly a correct solution. It also requires a different amount of spacing in each letter pair. The effect is present in TeXLive 2016 and 2017.

What is the correct fix?


The MWE version with mathdesign, garamondx:

enter image description here

Standard font (lmodern):

enter image description here

Adding negative space \! by hand:

enter image description here

MWE:

%\documentclass[a4paper,11pt,twoside,openright,final]{memoir}
\documentclass{standalone}

\usepackage{cmap} %% copy-paste usable

%% hyphenation?
%\usepackage[english]{babel}
\usepackage[main=british,ngerman,french]{babel}

%% quotes
\usepackage[babel=true]{csquotes}
\defineshorthand{"`}{\openautoquote}
\defineshorthand{"'}{\closeautoquote}
\useshorthands{"}
\useshorthands{"}
\addto\extrasenglish{\languageshorthands{ngerman}}

\usepackage[T1]{fontenc}
\usepackage[full]{textcomp}

\usepackage{lmodern}
\usepackage{amsmath}
%% works too, finer

%% the current standard
\usepackage[garamond]{mathdesign}
%\usepackage[garamondx]{newtxmath} %% does not work, unsure if better
\usepackage[full]{textcomp}
%\usepackage{garamondx}
\usepackage[swashQ]{garamondx}
\usepackage[T1]{fontenc}
%\newcommand{\mathbold}[1]{\ensuremath{\boldmath{#1}}}
\newcommand{\mathbold}[1]{\ensuremath{\mathbf{#1}}}
\usepackage[supstfm=NewG8-sups]{superiors}

%% the real sans-serif for texts
\usepackage[scale=0.91,defaultsans]{lato}

\usepackage[activate={true,nocompatibility},kerning=true,spacing=true,tracking=true,final]{microtype}
\microtypecontext{spacing=nonfrench} %% log said so

\begin{document}

The subscripts with greek letters have too much horizontal spacing:

$\epsilon_l$, $\varepsilon_l$, $\varepsilon_{\textup{\emph{l}}}$, $\varepsilon{}_l$.

$\epsilon_g$, $\varepsilon_g$, $\varepsilon_{\textup{\emph{l}}}$, $\varepsilon{}_g$.

$d_l$, $d_l$, $d_{\textup{\emph{l}}}$.

$\xi_l$, $\xi_\phi$, $\xi_{\textup{\emph{l}}}$.


\end{document}
  • possibly helpful: subscriptcorrection for mathdesign? – barbara beeton Nov 5 '17 at 17:51
  • Thank you! I defined \newcommand{\kerng}[1]{\mkern-5mu{#1}} and \newcommand{\kernl}[1]{\mkern-3mu{#1}}, with them: $\varepsilon_{\kernl{l}}$, vs. $\varepsilon_l$ and $\varepsilon_{\kerng{g}}$, vs. $\varepsilon_g$. – Oleg Lobachev Nov 5 '17 at 21:47
  • if the suggestion allowed you to solve your problem, can this question be closed? – barbara beeton Nov 5 '17 at 22:29
  • Yes. (I don't see a way to do this myself.) A more permanent and easy solution would be nice, but it does not seem it is out there. – Oleg Lobachev Nov 5 '17 at 23:11

Your Answer

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

Browse other questions tagged or ask your own question.