MathTime (mtpro2) 包含一个下标校正选项,这很棒。有没有办法让 mathdesign 获得类似的功能?在下面的 MWE 中,下标距离其“父级”太远了。
谢谢!
\documentclass[12pt]{article}
\usepackage[subscriptcorrection]{mtpro2} % pretty
%\usepackage[nosubscriptcorrection]{mtpro2} % ugly
%\usepackage[utopia]{mathdesign} % ugly
\begin{document}
\(
\omega_{jt}
\)
\end{document}
答案1
subscriptcorrection
通过从中获取代码来复制的行为并不困难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}
现在你只需修正所有的字距。