[Tex/LaTex] Math-mode kerning/spacing of letters

kerningmath-modespacing

Take the following two equations:

\begin{equation}
    o^{AR}_{i,t} = w^{AR}_i x_t + o^{AR}_{i+1,t-1}
\end{equation}

\begin{equation}
    o^{MA}_{i,t} = w^{MA}_i x_t + o^{MA}_{i+1,t-1}
\end{equation}  

enter image description here

The 'AR' and 'MA' are actually acronyms and are meant to be placed together with no gaps between them. I am aware that Math Mode treats each letter as an individual and doesn't kern them properly. This is particularly evident in the fact that the space between the 'M' and the 'A' is larger than between the 'A' and the 'R'.

Is there any way to get Math Mode to join the letters up more neatly?

Best Answer

As per the comments, I would suggest using \text{MA} or \mathrm{MA} and perhaps defining a macro for them if they are used often:

enter image description here

References:

Notes:

  • In this specific case it does not make sense to use \DeclareMathOperator as per the question these are acronyms and not operators.

Code:

\documentclass{article}
\usepackage{amsmath}

\newcommand*{\AR}{\text{AR}}%
\newcommand*{\MA}{\mathrm{MA}}%

\begin{document}
\begin{equation}
    o^{\AR}_{i,t} = w^{\AR}_i x_t + o^{\AR}_{i+1,t-1}
\end{equation}

\begin{equation}
    o^{\MA}_{i,t} = w^{\MA}_i x_t + o^{\MA}_{i+1,t-1}
\end{equation} 
\end{document}
Related Question