5

MathTime (mtpro2) contains a subscriptcorrection option, which is great. Is there some way to get similar functionality for mathdesign? In the MWE below the subscripts are too far from their `parent.'

Thanks!

\documentclass[12pt]{article}

\usepackage[subscriptcorrection]{mtpro2}         % pretty
%\usepackage[nosubscriptcorrection]{mtpro2}      % ugly
%\usepackage[utopia]{mathdesign}                 % ugly

\begin{document}
\(
 \omega_{jt}
\)
\end{document}
JPi
  • 13,595
  • Your question is basically a feature request for the package author to deal with, IMO. It's far too broad for a question on this site, I think. – Paul Gessler Jun 05 '15 at 14:53
  • It's not about this specific font, just about fonts in general. Perhaps it's a new package request, but I don't know that there's not a universal relatively simple way of dealing with it. – JPi Jun 05 '15 at 14:54
  • 1
    It being about fonts in general makes it even more broad than I originally thought. :-) Anyway, you might find parts of the solution at Kerning super- and subscripts "semantically" interesting/useful. – Paul Gessler Jun 05 '15 at 15:21
  • Thank you for the reference. I am puzzled why this universal problem even exists. The link doesn't quite explain that, or perhaps it does and I didn't understand it. – JPi Jun 05 '15 at 15:54

1 Answers1

5

It's not difficult to replicate the behavior of subscriptcorrection by fetching the code from mtpro2.sty:

\documentclass[12pt]{article}
\usepackage[utopia]{mathdesign}

\makeatletter
\AtBeginDocument{\mathcode`\_=\string"8000 \catcode`\_=12 }
\begingroup
 \catcode`\_=13
 \gdef_{\futurelet\next\s@@b}
\endgroup
\def\s@@b{\ifcat\relax\noexpand\next\expandafter\sb\else
 \expandafter\s@@b@\fi}
\def\s@@b@#1{\sb{\futurelet\next\sb@#1}}
\def\sb@{%
 \ifx\next\space@\def\next@. {\futurelet\next\sb@}\else
  \def\next@.{%
   \ifx\next f\mkern-\thr@@ mu\else
   \ifx\next j\mkern-\tw@ mu\else
   \ifx\next p\mkern-\tw@ mu\else
   \ifx\next t\mkern\@ne mu\else
   \ifx\next y\mkern-\@ne mu\else
   \ifx\next A\mkern-\tw@ mu\else
   \ifx\next B\mkern-\@ne mu\else
   \ifx\next D\mkern-\@ne mu\else
   \ifx\next H\mkern-\@ne mu\else
   \ifx\next I\mkern-\@ne mu\else
   \ifx\next K\mkern-\@ne mu\else
   \ifx\next L\mkern-\@ne mu\else
   \ifx\next M\mkern-\@ne mu\else
   \ifx\next P\mkern-\@ne mu\else
   \ifx\next X\mkern-\tw@ mu\else
   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
 \fi
 \next@.}
\makeatother

\begin{document}
\(\omega_{jt}\) (enabled)

\catcode`\_=8
\(\omega_{jt}\) (disabled)
\end{document}

Now you just have to fix all the kernings.

enter image description here

egreg
  • 1,121,712