# Fixing spacing on integral

How could one fix the spacing in the integral so that

$$f(z) = \frac{1}{1-\vert z \vert} \int_{B(z,1-\vert z\vert)} f(z) dz$$


doesn't leave so much space between the contour and the function $f(z)$.

You have several options:

\documentclass{article}
\usepackage{amsmath,mathtools}

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}

\newcommand{\lowersub}{\smash[b]{\vphantom{\bigg|}}}

\begin{document}

\begin{gather}
f(z) = \frac{1}{1-\abs{z}} \int_{B(z,1-\lvert z\rvert)} f(z)\,dz \$2ex] f(z) = \frac{1}{1-\abs{z}} \int_{B(z,1-\lvert z\rvert)} \hspace{-1em} f(z)\,dz \\[2ex] f(z) = \frac{1}{1-\abs{z}} \int_{\lowersub B(z,1-\lvert z\rvert)} \hspace{-1em} f(z)\,dz \\[2ex] f(z) = \frac{1}{1-\abs{z}} \int\limits_{B(z,1-\lvert z\rvert)} f(z)\,dz \\[2ex] f(z) = \frac{1}{1-\abs{z}} \int\limits_{B(z,1-\lvert z\rvert)} \hspace{-1em} f(z)\,dz \\[2ex] f(z) = \frac{1}{1-\abs{z}} \smashoperator[r]{\int\limits_{B(z,1-\lvert z\rvert)}} f(z)\,dz \end{gather} \end{document}  (1) is the default. (2) should be avoided, because the subscript clashes with the function; even worse if the amount of backing up is larger. (3) corrects a bit what is in (2), but I'd avoid large backup anyway. (4) is fine, in my opinion. (5) could be an improvement for somebody. (6) could also be an improvement, but is too tight to my eyes. You can use the \mathrlap command, from mathtools. Unrelated: don't use  ... , which is a plain TeX construct. Use the LaTeX construct \[ ...$ instead.

    \documentclass{article}

\usepackage{mathtools}

\begin{document}

$f(z) = \frac{1}{1-\vert z \vert} \int_{B(\mathrlap{z,1-\vert z\vert)}} f(z)\,\mathrm dz$

\end{document}


You can manually shift the part using \hspace{-3em} (which I don't personally prefer) or use \int\limits_{...} instead.

\documentclass{article}
\begin{document}
$\displaystyle f(z) = \frac{1}{1-\vert z \vert} \int_{B(z,1-\vert z\vert)} \hspace*{-3em}f(z) dz$\\[4ex]
$\displaystyle f(z) = \frac{1}{1-\vert z \vert} \int\limits_{B(z,1-\vert z\vert)} f(z) dz$\\[4ex]
\end{document}