Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

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.

share|improve this answer
    
Thank you. I feared, that there wouldn't be a a "ready-to-use" solution. So I will probably use the own package-approach (as updates to esint seem to be very unlikely -- last one was 2005) and also strip unused symbols. –  Guest Jan 11 at 13:45

You can use this simple trick to patch \oiint and its other siblings in your preamble:

\let\oldoiint\oiint
\renewcommand{\oiint}{\oldoiint\limits}

Example code:

\documentclass[a4paper, 11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath} 
\usepackage{esint} 

\let\oldoiint\oiint
\renewcommand{\oiint}{\oldoiint\limits}

\begin{document}

\[ \oiint_{O(V)}\]%\qquad \oiint\limits_{O(V)}

\end{document}

enter image description here

share|improve this answer
    
Thanks, that's really a simple-to-use solution. Although I do prefer the own package. –  Guest Jan 11 at 13:46
    
...also: As esint overrides all integrals from amsmath, it would be no time-saver to overwrite all integrals this way. I only mentioned one as an example, sorry for being unclear. –  Guest Jan 11 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.