# Left Aligning Subscripts

When using displayed (in contrast to inline) equations LaTeX center-aligns subscripts:

\Pr\limits_{{r \leftarrow_R \{0,1\}^n}} [ ... ]


However, I like them to be left aligned. This can be done by using \hspace

\Pr\limits_{\hspace{1cm}{r \leftarrow_R \{0,1\}^n}}  [ ... ]


But this is not a good solution, since the parameter of \hspace must be specified manually. (It differs based on the font and the length of the subscript.)

What other option I have?

-

\documentclass{article}
\usepackage{amsmath}

\newcommand{\Prl}[1]{
\mathop{\oalign{$\Pr$\hfill\cr
$\begin{subarray}{l}#1\end{subarray}$\hfill\cr}}
}

\begin{document}
\begin{gather}
\Prl{r \leftarrow_R \{0,1\}^n}abc \\
\Prl{r \leftarrow_R \{0,1\}^n\\abc}abc
\end{gather}
\end{document}


But I find this layout horrible, particularly in in-line formulas. :)

-
"this": the OP's desired layout, or the solution? – Brent.Longborough May 17 '11 at 9:17
@Brent: The desired layout, of course. :) – egreg May 17 '11 at 9:17
+1, Good! But, can you make it work, even when the subscripts are stacked (using subarray)? – M.S. Dousti May 17 '11 at 9:38
@Sadeq: now it uses subarray; you give \Prl the subscript with rows separated, as usual, by \ – egreg May 17 '11 at 11:07
Thanks a lot :) – M.S. Dousti May 17 '11 at 11:16