Re: [NTG-context] Double integral and subscripts

2007-08-07 Thread Shen Chen
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] for double integral, and used the usual \limits in
 plain tex:
 [EMAIL PROTECTED] 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!
 
 $$
 [EMAIL PROTECTED]
 {\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 [EMAIL PROTECTED], 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
___


Re: [NTG-context] Double integral and subscripts

2007-08-07 Thread Aditya Mahajan
Quoting Shen Chen [EMAIL PROTECTED]:

 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 [nt] {\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
___


Re: [NTG-context] Double integral and subscripts

2007-08-05 Thread Taco Hoekwater
Shen Chen wrote:
 Hi all,
 
 I want to typeset double integral with subscript beneath the integral
 symbol. 
 
 I found [EMAIL PROTECTED] for double integral, and used the usual \limits in
 plain tex:
 [EMAIL PROTECTED] 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!

$$
[EMAIL PROTECTED]
 {\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
___


Re: [NTG-context] Double integral and subscripts

2007-08-05 Thread Aditya Mahajan
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 [EMAIL PROTECTED] for double integral, and used the usual \limits in
 plain tex:
 [EMAIL PROTECTED] 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!

 $$
 [EMAIL PROTECTED]
 {\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 [EMAIL PROTECTED], 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
___