[Tex/LaTex] “esint” integrals with default limits

math-modemath-operators

When I'm trying to set a normal volume integral with the esint package, it will be generated with the limits set right to it:

Default volume integral with esint

A corresponding example code for this is

\documentclass{article}
\usepackage[intlimits]{amsmath}
\usepackage{esint}
\begin{document}
  \[ \oiint_{O(V)} \]
\end{document}

What I'd like to archieve is something more like \oiint\limits_{O(V)} but without actually typing the limits-command as this should be the default behaviour in my document. The documentation provides no option similiar to the intlimits usable with amsmath.

Until now I used a really dirty hack with \re@DeclareMathSymbol. Is there another way or maybe another package that could help me?

Best Answer

There is not a similar package option for esint. But you can use the command \oiintlim defined as

\def\oiintlim{\oiintop\limits}

MWE

\documentclass{article}
\usepackage[intlimits]{amsmath}
\usepackage{esint}
\def\oiintlim{\oiintop\limits}
\begin{document}
  \[ \oiintlim_{O(V)} \]
\end{document} 

Output

enter image description here


EDIT

Otherwise, it is very simple to create a new package extesint from the existing esint.

Save the following as extesint.sty where your document is (or somewhere in your TeX root and refresh the database):

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{extesint}
\DeclareOption{intlimits}{\let\ilimits@\displaylimits}
\DeclareOption{nointlimits}{\let\ilimits@\nolimits}
\ExecuteOptions{nointlimits}
\ProcessOptions
\def\re@DeclareMathSymbol#1#2#3#4{%
        \let#1=\undefined
        \DeclareMathSymbol{#1}{#2}{#3}{#4}}
\DeclareSymbolFont{largesymbolsA}{U}{esint}{m}{n}
\re@DeclareMathSymbol{\intop}{\mathop}{largesymbolsA}{'001}
        \def\int{\intop\ilimits@}
\re@DeclareMathSymbol{\iintop}{\mathop}{largesymbolsA}{'003}
        \def\iint{\iintop\ilimits@}
\re@DeclareMathSymbol{\iiintop}{\mathop}{largesymbolsA}{'005}
        \def\iiint{\iiintop\ilimits@}
\re@DeclareMathSymbol{\iiiintop}{\mathop}{largesymbolsA}{'007}
        \def\iiiint{\iiiintop\ilimits@}
\re@DeclareMathSymbol{\dotsintop}{\mathop}{largesymbolsA}{'011}
        \def\dotsint{\dotsintop\ilimits@}
\re@DeclareMathSymbol{\ointop}{\mathop}{largesymbolsA}{'013}
        \def\oint{\ointop\ilimits@}
\re@DeclareMathSymbol{\oiintop}{\mathop}{largesymbolsA}{'015}
        \def\oiint{\oiintop\ilimits@}
\re@DeclareMathSymbol{\sqintop}{\mathop}{largesymbolsA}{'017}
        \def\sqint{\sqintop\ilimits@}
\re@DeclareMathSymbol{\sqiintop}{\mathop}{largesymbolsA}{'021}
        \def\sqiint{\sqiintop\ilimits@}
\re@DeclareMathSymbol{\ointctrclockwiseop}{\mathop}{largesymbolsA}{'027}
        \def\ointctrclockwise{\ointctrclockwiseop\ilimits@}
\re@DeclareMathSymbol{\ointclockwiseop}{\mathop}{largesymbolsA}{'031}
        \def\ointclockwise{\ointclockwiseop\ilimits@}
\re@DeclareMathSymbol{\varointclockwiseop}{\mathop}{largesymbolsA}{'033}
        \def\varointclockwise{\varointclockwiseop\ilimits@}
\re@DeclareMathSymbol{\varointctrclockwiseop}{\mathop}{largesymbolsA}{'035}
        \def\varointctrclockwise{\varointctrclockwiseop\ilimits@}
\re@DeclareMathSymbol{\fintop}{\mathop}{largesymbolsA}{'037}
        \def\fint{\fintop\ilimits@}
\re@DeclareMathSymbol{\varoiintop}{\mathop}{largesymbolsA}{'041}
        \def\varoiint{\varoiintop\ilimits@}
\re@DeclareMathSymbol{\landupintop}{\mathop}{largesymbolsA}{'043}
        \def\landupint{\landupintop\ilimits@}
\re@DeclareMathSymbol{\landdownintop}{\mathop}{largesymbolsA}{'045}
        \def\landdownint{\landdownintop\ilimits@}
\endinput

Then, the following MWE works as expected

\documentclass{article}
\usepackage[intlimits]{amsmath}
\usepackage[intlimits]{extesint}

\begin{document}
\[ \oiint_{O(V)} \]
\end{document} 

Omitting intlimits or using nointlimits let it works as esint.