iint, iiint, etc. for math mode
Hi, Here is ConTeXt version of iint, iiint, etc from amsmath. Basically, just combine the intop symbols with appropriate kern between them. And in case of \iint\limits, provides a visually centered subscript. Aditya \unprotect \def\dointkern {\mkern-6mu\mathchoice{\mkern-3mu}{}{}{}} \definemathcommand [iint] {\repeatintegral{1}} \definemathcommand [iiint] {\repeatintegral{2}} \definemathcommand [iiiint] {\repeatintegral{3}} \def\repeatintegral#1% {\scratchtoks\emptytoks \let\dointlimits\nolimits \dorecurse{#1}{\appendtoks \intop \dointkern \to \scratchtoks} \appendtoks \intop \dointlimits \to \scratchtoks \edef\dodorepeatintegral{\the\scratchtoks} \futurelet\next\dorepeatintegral} %D If the \type{\limits} option is used after \type{\iint}, use %D \type{\mathop} and fudge the left hand space a bit to make the %D subscript visually centered. \def\dorepeatintegral {\ifx\limits\next \dointlimitcorrection \else \ifx \displaylimits\next \dointlimitcorrection \fi\fi \dodorepeatintegral} \def\dointlimitcorrection {\mkern-7mu\mathchoice{\mkern-2mu}{}{}{}% \mathop\bgroup \mkern7mu\mathchoice{\mkern2mu}{}{}{}% \let\dointlimits\egroup} \protect \starttext \tracingmacros=2 $$ \iint_a f(x) dx \iint\limits_a f(x) dx $$ $$ \iiint_a f(x) dx $$ \stoptext
participants (1)
-
Aditya Mahajan