[Tex/LaTex] Typesetting sequence notation

math-modespacing

I attempted to create a sequence both of the following ways:

\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{amsmath,amsthm}
\usepackage{amsfonts}
\begin{document}
$(x_j)\limits_{j=1}^\infty$

$(x_j)_{j=1}^\infty$
\end{document}

Is there a way to get the vertical spacing of the first with the horizontal spacing of the second?enter image description here

Best Answer

Here's an alternative. It provides left-alignment of the super/subscripts.

EDIT: In an effort to answer the OP's question, "Is there a way to get it so that the limits are left aligned with the horizontal midpoint of the close paren in automatic fashion?" The answer is yes. Here it is:

\documentclass[12pt]{article}
\usepackage[usestackEOL]{stackengine}
\parskip 1.5ex
\stackMath
\begin{document}
\newcommand\specparen[2]{%
  \def\Krn{\kern1ex}%
  \def\useanchorwidth{T}%
  \setbox0=\hbox{\Krn\stackengine{0pt}{\scriptstyle#1}{\scriptstyle#2}{O}{c}{F}{F}{S}}%
  \stackon[2pt]{\stackunder[2pt]{)}{\makebox[\wd0][l]{\Krn$\scriptstyle#1$}}}%
                                   {\makebox[\wd0][l]{\Krn$\scriptstyle#2$}}%
}
$(x_j\specparen{j=1}{\infty} = y$

$(x_j\specparen{j=1}{j=\infty} = y$
\end{document}

Here is with \Krn set to 0ex (which truly sets the sub/superscript midpoint to the center of the right paren):

enter image description here

and here it is with \Krn set to 1ex (which does a controllable rightward shift of the sub/superscript):

enter image description here