3

Sorry for the title, I couldn't come up with a better one. I need to typeset an integral like this.

\int\limits_{f(x) < g(x)} \mathrm{d}x\,F(x)

The point is that the condition for the domain of integration is very lengthy. LaTeX will center this under the integral and put a huge space between the integral symbol and the integrand/differential symbol. I would like to delete this space, ideally to the left and to the right, because in many cases there will be nothing that could collide with the domain of integration.

So I came up with this:

\newcommand{\nint}[1]{\int\limits_{\begin{minipage}[t]{1.7em}\centering \mbox{$ \scriptstyle #1 $}\end{minipage}}}

The result is not bad (but as you can see, \centering has no effect. Not that I expected this to work, but I thought it was worth a try):

\[   C\,\vert E_0 \vert\,\nint{V(x) < E_0} \dd^d x\,\vert V_-(x) \vert^{d/2}  \]

This is what it looks like

Nevertheless, I am not completely pleased. I would like to use some space from the left, too. My dream would be, since I will have conditions a < b, to center a symbol (<) under the integral. But I would also be happy with a centering of the whole thing under the integral.

Any suggestions, anyone?

3

You can use \smashoperator (with care, abusing it could lead to bad output):

\documentclass{article}
\usepackage{mathtools}

\newcommand{\diff}[1][]{%
  \mathrm{d}%
  \if\relax\detokenize{#1}\relax\else^{#1}\fi
}

\begin{document}

\[
C\lvert E_0\rvert
\smashoperator{\int\limits_{V(x)<E_0}}
  \diff[d]x\,\lvert V_{-}(x)\rvert^{d/2}
\]

\end{document}

enter image description here

| improve this answer | |
  • 1
    @jacques: I’d like to add a word of advice: ask yourself whether you are using the best notation. Perhaps you would do your readers a favor if you wrote simply \int_{I} ... and explained separately what the set I consists of. – GuM Jun 1 '18 at 0:11

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.