ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Double integral and subscripts
@ 2007-08-05  9:28 Shen Chen
  2007-08-05  9:48 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Shen Chen @ 2007-08-05  9:28 UTC (permalink / raw)
  To: ntg-context

Hi all,

I want to typeset double integral with subscript beneath the integral
symbol. 

I found \unic@dblint for double integral, and used the usual \limits in
plain tex:
\unic@dblint\limits_{\startsubstack x \ge 0,\NR 0 \le y \le T\stopsubstack}

The subscript did go below the integral, but the two integral symbols are
separate from each other. Any tips? Thanks a lot!

Shenchen

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Double integral and subscripts
  2007-08-05  9:28 Double integral and subscripts Shen Chen
@ 2007-08-05  9:48 ` Taco Hoekwater
  2007-08-05 14:10   ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2007-08-05  9:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Shen Chen wrote:
> Hi all,
> 
> I want to typeset double integral with subscript beneath the integral
> symbol. 
> 
> I found \unic@dblint for double integral, and used the usual \limits in
> plain tex:
> \unic@dblint\limits_{\startsubstack x \ge 0,\NR 0 \le y \le T\stopsubstack}


> The subscript did go below the integral, but the two integral symbols are
> separate from each other. Any tips? Thanks a lot!

$$
\mathop{\unic@dblint}\limits_
     {\startsubstack x \ge 0,\NR 0 \le y \le \stopsubstack}
$$

(it should be possible to do this more elegant, though)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Double integral and subscripts
  2007-08-05  9:48 ` Taco Hoekwater
@ 2007-08-05 14:10   ` Aditya Mahajan
  2007-08-07 13:48     ` Shen Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2007-08-05 14:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 5 Aug 2007, Taco Hoekwater wrote:

> Shen Chen wrote:
>> Hi all,
>>
>> I want to typeset double integral with subscript beneath the integral
>> symbol.
>>
>> I found \unic@dblint for double integral, and used the usual \limits in
>> plain tex:
>> \unic@dblint\limits_{\startsubstack x \ge 0,\NR 0 \le y \le T\stopsubstack}
>
>
>> The subscript did go below the integral, but the two integral symbols are
>> separate from each other. Any tips? Thanks a lot!
>
> $$
> \mathop{\unic@dblint}\limits_
>     {\startsubstack x \ge 0,\NR 0 \le y \le \stopsubstack}
> $$
>
> (it should be possible to do this more elegant, though)

\iint\limits should work correctly. It is based on the same macro in 
amsmath.

If you always need \limits, I can provide an option for \displaylimits 
or \nolimits after int, iint, and iiint.

I did not know about unic@dblint, and it looks horrible 
(\int\!\!\!\int). This should be replaced by \iint and triint should 
be replaced by iiint.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Double integral and subscripts
  2007-08-05 14:10   ` Aditya Mahajan
@ 2007-08-07 13:48     ` Shen Chen
  2007-08-07 17:02       ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Shen Chen @ 2007-08-07 13:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I am using "ConTeXt ver: 2007.01.12", and \iint is not defined even when
newmat is imported. Taco's tip worked.

As I tried on live.contextgarden.net, which is running the latest ConTeXt,
\iint\limits_{...} works as intended.

Thank you.


On 8/5/07 10:10 PM, "Aditya Mahajan" <adityam@umich.edu> wrote:

> On Sun, 5 Aug 2007, Taco Hoekwater wrote:
> 
>> Shen Chen wrote:
>>> Hi all,
>>> 
>>> I want to typeset double integral with subscript beneath the integral
>>> symbol.
>>> 
>>> I found \unic@dblint for double integral, and used the usual \limits in
>>> plain tex:
>>> \unic@dblint\limits_{\startsubstack x \ge 0,\NR 0 \le y \le T\stopsubstack}
>> 
>> 
>>> The subscript did go below the integral, but the two integral symbols are
>>> separate from each other. Any tips? Thanks a lot!
>> 
>> $$
>> \mathop{\unic@dblint}\limits_
>>     {\startsubstack x \ge 0,\NR 0 \le y \le \stopsubstack}
>> $$
>> 
>> (it should be possible to do this more elegant, though)
> 
> \iint\limits should work correctly. It is based on the same macro in
> amsmath.
> 
> If you always need \limits, I can provide an option for \displaylimits
> or \nolimits after int, iint, and iiint.
> 
> I did not know about unic@dblint, and it looks horrible
> (\int\!\!\!\int). This should be replaced by \iint and triint should
> be replaced by iiint.
> 
> Aditya
> ______________________________________________________________________________
> _____
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ______________________________________________________________________________
> _____

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Double integral and subscripts
  2007-08-07 13:48     ` Shen Chen
@ 2007-08-07 17:02       ` Aditya Mahajan
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2007-08-07 17:02 UTC (permalink / raw)
  To: ntg-context

Quoting Shen Chen <ShenChen@nus.edu.sg>:

> I am using "ConTeXt ver: 2007.01.12", and \iint is not defined even when
> newmat is imported. Taco's tip worked.

They were added pretty recently. You can either update your context, or 
if you do not want to do that, add the following in your environment 
file (copied from math-tex.tex).

%D More integrals (AM):

\def\dointkern{\mkern-6mu\mathchoice{\mkern-3mu}{}{}{}}

\definemathcommand [iint]   {\repeatintegral\plusone  }
\definemathcommand [iiint]  {\repeatintegral\plustwo  }
\definemathcommand [iiiint] {\repeatintegral\plusthree}

\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\next\limits        \dointlimitcorrection \else
    \ifx\next\displaylimits \dointlimitcorrection \fi\fi
    \dodorepeatintegral}

\def\dointlimitcorrection
  {\mkern-7mu\mathchoice{\mkern-2mu}{}{}{}%
   \mathop\bgroup
     \mkern7mu\mathchoice{\mkern2mu}{}{}{}%
     \let\dointlimits\egroup}


Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-07 17:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-05  9:28 Double integral and subscripts Shen Chen
2007-08-05  9:48 ` Taco Hoekwater
2007-08-05 14:10   ` Aditya Mahajan
2007-08-07 13:48     ` Shen Chen
2007-08-07 17:02       ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).