10

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

  • Are you after something like $({\displaystyle\mathop{x_j}^\infty_{j=1}})$? – Werner Mar 12 '14 at 5:33
  • @Werner, no, more to shift the limits to just after the right paren. – soandos Mar 12 '14 at 5:36
  • Since the right brace is treated as an operator, try the mathtools command \mathclap{} like this: )\limits_{\mathclap{j=1}}^{\mathclap{\infty}}. This should get rid of the unwanted horizontal left space. – TheVal Mar 12 '14 at 6:08
  • @AndreaL. Is there a way to make it so that the limits are just one space after the close paren? – soandos Mar 12 '14 at 6:14
  • If you want to create a new space between the limits and the brace, I suggest a manual shift using \mkern, as Harish Kumar used. – TheVal Mar 12 '14 at 6:21
5

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

  • I'm curious. 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? Currently, I have to muck about with mu or pt to make it work. – soandos Mar 12 '14 at 10:26
  • @soandos Please see revision. Is this what you mean? – Steven B. Segletes Mar 12 '14 at 10:45
  • Thank you. Didn't realized that there was such a mechanism (em and ex) – soandos Mar 12 '14 at 11:12
  • @soandos Nice thing is that em and ex scale with the document fontsize, whereas pt does not. However, even em and ex do not scale with smaller math styles (\scriptstyle and \scriptscriptstyle), though provisions can be made for that too (see \ThisStyle{} of the scalerel package, for example). – Steven B. Segletes Mar 12 '14 at 11:16
  • Interesting. Also, do you have any idea why MikTeX cannot seem to find stackengine? – soandos Mar 12 '14 at 11:20
9

Like the following?

\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{mathtools,amsthm}
\usepackage{amsfonts}
\begin{document}
$(x_j\mkern-10.5mu\mathop{)}\limits_{j=1}^\infty$

$(x_j)\mkern-10.5mu\mathop{\vphantom{)}}\limits_{j=1}^\infty$

$\mathop{(x_j)}\limits_{j=1}^{\infty}$

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

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.