Is there a way to make specific letters in equation mode have the same width? I could use the command \texttt{} outside the align environment but not in math mode. For instance, the script below generates the following
\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{amsmath}
\begin{document}
\begin{align}
\hat{y}^t &= \alpha^t_{l,\text{h}}\hat{y}^t \odot m_l + \textstyle\sum_{i} \alpha^t_{l,i}\hat{y}^t_{l,i} \odot (1 - m_l) \
\hat{y}^t &= \alpha^t_{r,\text{h}}\hat{y}^t \odot m_r + \textstyle\sum_{i} \alpha^t_{r,i}\hat{y}^t_{r,i} \odot (1 - m_r)
\end{align}
\noindent
\texttt{your text - IN CAPITALS}\
\texttt{lrlr text - IN CAPITALS}
\end{document}
I have a lot of such equations that need to be computed and read sequentially and i think it would be nicer if I could have at least specific letters occupy the same width. In the example above I would like the subscripts l and r have the same width or have the letter l have extra padding to match total width the letter r takes. I cannot use their capital letters.


l. – user202729 Apr 25 '23 at 02:54