%  bigint.sty (or bigint.tex)   -- Donald Arseneau
% 
%  Make a big integral sign using the extensible \lmoustache
%  with balls on the tips.  This will *only* work for the cmex10
%  math extension font (possibly scaled to some other size).
%  The size of the integral depends on the integrand (argument)
%  with a minimum of approximately the size of the normal \int.
%  Note that the integral sign is vertically centered; the integrand
%  need not be.
%
%  The syntax is:
%
%  \bigint [ <overlap> ] <limits> { <integrand> }
%
%  - The integrand is what is being integrated.  Unlike the normal
%  \int syntax, the braces are necessary for \bigint.
%  - The limits are the integration limits expressed in the normal
%  way, with _{ }, ^{ }, \limits, \nolimits, and/or \displaylimits.
%  Any, none, or even all of these may be used.
%  - The optional argument gives a character to overlap with the 
%  integral sign.  This is for making a big \oint or others.
%  (\bigoint is defined as \bigint[\bigcirc])
%  - The \bigint command itself may be repeated to produce multiple
%  integral signs at the same size, but only the last copy takes 
%  parameters:  \bigint\bigint_0^1{...}  is correct. 
%  \bigint_0^1 \bigint_{-1}^0{...} will give an error.  For multiple
%  integrals with separate limits use \bigint_0^1 {\bigint _{-1}^1 {...}}. 
%
%  Examples (alternately written for LaTeX and plain TeX):
%
%  \bigint {\frac{\displaystyle 1 - \frac{1}{x^2}}{\sqrt{\displaystyle
%            x + \frac{1}{x} }}\,\,dx} = 2\sqrt{\displaystyle x+\frac{1}{x}}
%  \bigint_0^1{dx \over \sqrt{\displaystyle \log{\left( 1 \over x \right) }}}
%                 = \sqrt{\pi}
%  \bigint\bigint\bigint\limits_{-\infty}^{+\infty} {\left( \begin{array}{c} 
%           a\\b\\c\\d\\e \end{array} \right)\,dx\,dy\,dz}
%  \bigint[-]_{-\infty}^{+\infty} { {e^{iwt}\over \sqrt{w^2 + w + 1}}\;dw}

\edef\BIcatz{\the\catcode`\@}
\catcode`\@=11

\newtoks\supsubtoks

\def\bigint{\begingroup \displaystyle
 \edef\@bi@fam{\fam\the\fam\relax}%
 \supsubtoks{}\def\@bi@lap{}\count@\@ne \bi@gint}

\def\bi@gint{\futurelet\@bi@next\@bi@gint}

\def\@bi@gint{% parse limits and options
\ifcase 0%
  \ifx\@bi@next\limits1\fi \ifx\@bi@next\nolimits1\fi 
  \ifx\@bi@next\displaylimits1\fi 
  \if\noexpand\@bi@next\space2\fi
  \ifcat\noexpand\@bi@next\sp3\fi
  \ifcat\noexpand\@bi@next\sb3\fi
  \ifx\@bi@next[4\fi
  \ifx\@bi@next\bigint 5\fi
 \relax \expandafter \bi@@gint
 \or \expandafter\@bi@applim
 \or \expandafter\@bi@eatspa\expandafter\\%
 \or \expandafter\@bi@appscr
 \or \expandafter\@bi@intopt
 \or \expandafter\@bi@multii
 \fi}

\def\@bi@intopt[#1]{\def\@bi@lap{#1}\bi@gint}
\def\@bi@applim#1{\supsubtoks\expandafter{\the\supsubtoks#1}\bi@gint}
\def\@bi@appscr#1#2{\supsubtoks\expandafter{\the\supsubtoks
   #1{\ifcat#1\sb \mkern-9mu\relax\fi#2}}\bi@gint}
\def\@bi@eatspa\\ {\bi@gint}
\def\@bi@multii#1{\if @\the\supsubtoks \ifx\@bi@lap\empty @\else.\fi
    \advance\count@\@ne \expandafter \bi@gint \else
    \expandafter \bi@@gint \fi}

\def\bi@@gint#1{\setbox\z@\hbox{$\m@th \@bi@fam \displaystyle {#1}$}%
   \dimen@2\ifdim\ht\z@>\dp\z@\ht\else\dp\fi\z@ % figure it out!
   \mathop{\@big@int}\nolimits
   \the\supsubtoks \box\z@ \mskip\medmuskip \endgroup}

% use vert. center, left edge for ref. point on -
% use center-center for ref. point on bullet
%
% character positioning parameters:
% {whole_top_horiz.}{wt_vertical}{top_ball_h}{tb_v}
%    {whole_bottom_horiz.}{wb_vertical}{bottom_ball_h}{bb_v}
\def\@big@Int#1#2#3#4#5#6#7#8#9{%
 \ifx\@bi@lap\empty \else 
  \rlap{{\the\textfont3 \kern #9em}\hbox to\z@
   {\hss$\m@th \@bi@fam \@bi@lap$\hss}}\fi
 \vcenter
 to\ifdim\dimen@<20pt 20pt \else\dimen@\fi
 {\the\textfont3 \m@th % do \lmoustache in a vbox.
  \hbox{8\smash{\kern-#1em\lower#2ex\hbox{%
     $\vcenter{\rlap{\the\scriptscriptfont0 -}}$%
     \kern#3em
     $\vcenter{\kern#4ex\hbox to\z@{\hss \the\scriptscriptfont2 ^^O\hss}}$%
     \kern#3em\kern1pt}}}\nointerlineskip\kern-3pt
  \cleaders\hbox{>}\vfil
  \kern-3pt\hbox{;}\nointerlineskip 
  \smash{\kern#5em\lower#6ex\hbox{%
     $\vcenter{\rlap{\the\scriptscriptfont0 -}}$%
     \kern#7em
     $\vcenter{\kern-#8ex\hbox to\z@{\hss \the\scriptscriptfont2 ^^O\hss}}$%
  }}\kern\z@
 }\ifnum\count@>\@ne
   \advance\count@\m@ne \mskip-5mu \relax \expandafter \@big@int\fi 
}

% Here are the parameters for piecing the integral together.  Even though
% I tried to use stable reference points on the characters, there is still
% quite a bit of variation when size changes so these can be varied.  

\def\@big@int{%
 \@big@Int{.2315}{.6455}{.1768}{.4673}{.0395}{.5116}{.0282}{.504}{0.4472}}

\def\bigoint{\bigint[\bigcirc]}

\catcode`@=\BIcatz \let\BIcatz\underfined

\endinput

From: asnd@reg.triumf.ca (Donald Arseneau)
Newsgroups: comp.text.tex
Subject: Re: large integral sign
Date: 25 Aug 1993 17:36 PST
Keywords: \int \bigint integral sign

On 1993Aug20, dost@uctvax.uct.ac.za wrote...

>i would like to print out some formulae in the largest possible font so 
>that i can make nice overhead transparencies from them. however the integral
>sign (\int) seems to have just 4 sizes (displaymath, inline, script, and
>scriptscript). so it comes out looking absurdly small 

It is possible to use a bigger "math extension font", perhaps
cmex10 scaled \magstep4.  But this can mess up the appearence
of some things, so be careful.  (The math extension font is
\textfont 3.)

>the integral sign should
>be a delimiter (like brackets for example) which can expand or shrink to
>the size of its contents, but it seems not to be so.

Superscripts and subscripts are not placed appropriately after a left
delimiter, so \left\bigint ... \right. is not correct.  There was
a macro for using \lmoustache for a big integral in a TeX and TUG
News... but it doesn't look much like an integral. so.......

*WHY* do I waste my time on things like this????
