I have been using the following \subsup command
\newcommand{\subsup}{
\makeatletter
\AtBeginDocument{
\check@mathfonts
\fontdimen16\textfont2=2.5pt
\fontdimen17\textfont2=2.5pt
\fontdimen14\textfont2=4.5pt
\fontdimen13\textfont2=4.5pt}
\makeatother}
in order to change the default positions of subscripts and superscripts in math mode. I used the \subsup command when needed and I was compiling with MikTex.
\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\newcommand{\subsup}{
\makeatletter
\AtBeginDocument{
\check@mathfonts
\fontdimen16\textfont2=2.5pt
\fontdimen17\textfont2=2.5pt
\fontdimen14\textfont2=4.5pt
\fontdimen13\textfont2=4.5pt}
\makeatother}
\subsup
\begin{document}
\[ x_A \]
\end{document}
When I switched to TexLive I got the following errors
Package amsmath Error: \check allowed only in math mode. \begin{document}
Font \nullfont has only 7 fontdimen parameters. \begin{document}
In order to fix that I had to call the same code without the \subsup command, just placed right before \begin{document}
\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\makeatletter
\AtBeginDocument{
\check@mathfonts
\fontdimen16\textfont2=2.5pt
\fontdimen17\textfont2=2.5pt
\fontdimen14\textfont2=4.5pt
\fontdimen13\textfont2=4.5pt}
\makeatother
\begin{document}
\[ x_A \]
\end{document}
Is there another simple way to use this code by command?