3

Integrals with limits take up width horizontally that includes their limits. In other words, if you have an integral with large limits below (or above) the integral

\int\limits_{-\infty < x < c} (c - x) \ dP(x)

you are left with a large amount of space to the left and right of the integral before the integrand (c - x) starts. This is sometimes desirable, but in my case it isn't, since I have a whole bunch of integrals like this all in the same expression. Is there a way to make whatever is inside the integral snuggle up next to the integral sign, ignoring the width of the limit?

Dan
  • 528
  • 2
  • 6
  • 14

3 Answers3

8

Something like this will do the trick.

\usepackage{amsmath}
\def\mathclap#1{\text{\hbox to 0pt{\hss$\mathsurround=0pt#1$\hss}}}
\begin{document}
\[
\int\limits_{\mathclap{-\infty < x < c}} (c - x) \ dP(x)
\]
\end{document}

More about such tricks is given in this article.

Rob Hyndman
  • 30,301
  • 7
  • 73
  • 85
8

It is possible with less effort:

\int\!\!\!{olution}

\! is a negative space. However, when a lot of formulas have to be altered, the previously posted answers may be more appropriate.

Mark Ursino
  • 31,209
  • 11
  • 51
  • 83
kiero
  • 121
  • 1
  • 7
2

The mathtools package contains a definition for \mathclap, and also a command \smashoperator that is a bit more convenient:

\smashoperator{\int_{\infty < x < c}} (c - x) \, dP(x)
Philipp
  • 48,066
  • 12
  • 84
  • 109