18

My tex

\begin{equation}
 \iint \limits_{-\infty}^{+\infty} 
\end{equation}

It looks like

enter image description here

I want two limits there above and below.

How can you have two limits above and below the two integrals?

1
  • 2
    How 'bout just using \int twice? Commented Dec 5, 2013 at 14:44

3 Answers 3

20

You are probably expecting iterated integral, not double integral. Hence

\documentclass{article}

\begin{document} 

\newcommand{\Int}{\int\limits}

\begin{equation}
\Int_{-\infty}^{+\infty} \Int_{-\infty}^{+\infty}f(x,y) \,dx\,dy
\end{equation}

\end{document}

enter image description here

0
11

The multiple integral macros by amsmath only support lower limits on multiple integrals.

You can get around this by using a specialized font for integrals, like the one provided by esint.

\documentclass{article}
\usepackage{amsmath}
\usepackage{esint}

\makeatletter
%% make esint definition in line with amsmath
\@for\next:={int,iint,iiint,iiiint,dotsint,oint,oiint,sqint,sqiint,
  ointctrclockwise,ointclockwise,varointclockwise,varointctrclockwise,
  fint,varoiint,landupint,landdownint}\do{%
    \expandafter\edef\csname\next\endcsname{%
      \noexpand\DOTSI
      \expandafter\noexpand\csname\next op\endcsname
      \noexpand\ilimits@
    }%
  }
\makeatother

\begin{document}

\begin{equation*}
 \iint \limits_{-\infty}^{+\infty}
\end{equation*}

\end{document}

enter image description here

1
3

Here comes a possible solution

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newlength\tmp@\newlength\t@mp
\newcommand{\comp}[3]
  {\mathop{ \settowidth\tmp@{$\displaystyle\mathop{#1}^{#3}_{#2}$}
  \hbox to \tmp@{\hss \settowidth\t@mp{$\displaystyle #1$}\setlength\t@mp{.45\t@mp}
  $\displaystyle\mathop{#1}^{\hspace\t@mp #3}_{\hspace{-\t@mp}#2}$
  \hss} }}
\makeatother

\begin{document}
\[
\begin{aligned}
  &\comp{\int}{A}{B}+\int\\
  &\intop_A^B+\intop\\
  &\intop+\intop\\
  &\comp{\int}{AAA}{BBB}+\int\\
  &\intop_{AAA}^{BBB}+\int\\
  &\comp{\int}{AAAAAAAAA}{BBBBBBBBB}+\int\\
  &\intop_{AAAAAAAAA}^{BBBBBBBBB}+\int\\
\end{aligned}
%
\begin{aligned}
  &\comp{\int}{A}{B}\intop_{A}^{B}\\
  &\comp{\int}{AAA}{\rule{1cm}{10cm}}\intop_{AAA}^{\rule{1cm}{10cm}}\\
  &\comp{\int}{AAAAAAAAA}{BBBBBBBBB}\intop_{AAAAAAAAA}^{BBBBBBBBB}\\
%
  &\comp{\iint}{A}{B}\iint\limits_{A}^{B}\iint\\
  &\comp{\iint}{AAA}{BBB}\quad\iint\limits_{AAA}^{BBB}\iint
  \comp{\iint}{-\infty}{+\infty}\\
  &\comp{\iint}{AAAAAAAAA}{BBBBBBBBB}\quad\iint\limits_{AAAAAAAAA}^{BBBBBBBBB}\iint\\
%
\end{aligned}
\]
\end{document}

enter image description here enter image description hereenter image description here

4
  • Welcome to TeX.SE. If you indent lines of code by four spaces -- most easily done by highlighting the rows in question and clicking o the {} "button" in the row above the edit window -- the site's software will pretty-print the code automatically. (Backticks should be used only for inline code snippets.)
    – Mico
    Commented Dec 11, 2016 at 20:52
  • I've taken the liberty of editing your code to make it minimally compilable. Providing fully compilable examples rather than code snippets that make you guess which packages might have to be loaded (here: the amsmath package for the \iint macro) can be a frustrating exercise, the more so if the reader isn't an experienced LaTeX user.
    – Mico
    Commented Dec 11, 2016 at 21:00
  • Can you please explain the purpose of \rlap? Commented Dec 12, 2016 at 8:45
  • 1
    @Masir I just use it to create the superscript +\infty. What \rlap contains is actually hidden. But I'm not sure if it works on your system since I didn't get a correct result as expected. Commented Dec 13, 2016 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .