Re: [NTG-context] \startcases...\stopcases alignment

2010-09-28 Thread Martin 'golodhrim' Scholz
On Mon, 27 Sep 2010 21:07:18 -0400, Aditya Mahajan wrote:

 On Tue, 28 Sep 2010, Martin 'golodhrim' Scholz wrote:
 
 Hi everyone,

 I've got one big question,

 if I type something like

 \startcases
 \NC A \NC B\NR
 \NC C \NC D
 \stopcases

 Both the A and B are left justified and I would like to have them
 horizontally centered above the C and D. Is there a way to do
 so without a matrix usage or is for that the matrix the only
 solution...
 
 Currently, mathcases do not accept an align key. So matrix is the only
 solution.
 
 \definemathmatrix
 [cases]
 [align=middle, left=\left\{\, right=\right.]
 
 should work.
 
 Aditya
 

Thanks for the fast help Aditya.

-- 
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
Germany
Phone: +49 6454 799623
mobile: +49 176 63301749
Fax: +49 6454 7990138
e-Mail: scholz@googlemail.com

What an artist dies with me!
-- Nero

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \startcases...\stopcases alignment

2010-09-27 Thread Martin 'golodhrim' Scholz
Hi everyone,

I've got one big question,

if I type something like

\startcases
\NC A \NC B\NR
\NC C \NC D
\stopcases

Both the A and B are left justified and I would like to have them 
horizontally centered above the C and D. Is there a way to do so 
without a matrix usage or is for that the matrix the only solution...

Greetings
-- 
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
Germany
Phone: +49 6454 799623
mobile: +49 176 63301749
Fax: +49 6454 7990138
e-Mail: scholz@googlemail.com

I think we're in trouble.
-- Han Solo

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \startcases...\stopcases alignment

2010-09-27 Thread Aditya Mahajan

On Tue, 28 Sep 2010, Martin 'golodhrim' Scholz wrote:


Hi everyone,

I've got one big question,

if I type something like

\startcases
\NC A \NC B\NR
\NC C \NC D
\stopcases

Both the A and B are left justified and I would like to have them
horizontally centered above the C and D. Is there a way to do so
without a matrix usage or is for that the matrix the only solution...


Currently, mathcases do not accept an align key. So matrix is the only 
solution.


\definemathmatrix
   [cases]
   [align=middle, left=\left\{\, right=\right.]

should work.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Math align with \startcases

2009-01-19 Thread Otared Kavian

Hi everyone,

This question is primarily intended for Aditya… but I guess other  
fellows on the list can also help me solve the following alignment  
problem:
Is it possible to have an alignment like the rsult of the following  
with \startcases...\stopcases?


\starttext

\startformula
 \startmatrix[align={right,left,right},distance=3pt,left={\left\{},  
right={\right.}]

   \NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
   \NC \displaystyle {\partial u \over \partial {\bf n} } \NC{} =  
h(u) \NC \quad\mbox{on } \partial\Omega   \NR

 \stopmatrix
\stopformula

\stoptext

Actually I used to have such alignments with the following structure  
(in good old plain TeX...):


\starttext

\startformula
\cases{
\eqalign{
 -\Delta u + g(u) = f \cr
 \displaystyle {\partial u \over \partial {\bf n} } = h(u) \cr
} \quad \eqalign{
\hbox{in } \Omega \cr
\vphantom{{\partial u \over \partial {\bf n} }} \hbox{on } \partial 
\Omega \cr

}
}
\stopformula

\stoptext

(which gives approximately the same result as the first example above,  
but clearly the math-alignment structure set up by Aditya and Hans is  
much more elegant. (Although I prefer the vertical distance between  
the lines obtained with my plain TeX structure: by the way is it  
possible to fine tune such things in ConTeXt).
So my question is: whether one can use \startcases ...\stopcases  
instead of \startmatrix ... \stopmatrix in order to obtain the result  
of the plain TeX example?


Thanks in advance: OK
___
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] Math align with \startcases

2009-01-19 Thread Aditya Mahajan

On Mon, 19 Jan 2009, Otared Kavian wrote:


Hi everyone,

This question is primarily intended for Aditya… but I guess other fellows on 
the list can also help me solve the following alignment problem:
Is it possible to have an alignment like the rsult of the following with 
\startcases...\stopcases?


\starttext

\startformula
\startmatrix[align={right,left,right},distance=3pt,left={\left\{}, 
right={\right.}]

 \NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
 \NC \displaystyle {\partial u \over \partial {\bf n} } \NC{} = h(u) \NC 
\quad\mbox{on } \partial\Omega   \NR

\stopmatrix
\stopformula

\stoptext

Actually I used to have such alignments with the following structure (in good 
old plain TeX...):


\starttext

\startformula
\cases{
\eqalign{
-\Delta u + g(u) = f \cr
\displaystyle {\partial u \over \partial {\bf n} } = h(u) \cr
} \quad \eqalign{
\hbox{in } \Omega \cr
\vphantom{{\partial u \over \partial {\bf n} }} \hbox{on } \partial\Omega 
\cr

}
}
\stopformula

\stoptext

(which gives approximately the same result as the first example above, but 
clearly the math-alignment structure set up by Aditya and Hans is much more 
elegant. (Although I prefer the vertical distance between the lines obtained 
with my plain TeX structure: by the way is it possible to fine tune such 
things in ConTeXt).
So my question is: whether one can use \startcases ...\stopcases instead of 
\startmatrix ... \stopmatrix in order to obtain the result of the plain TeX 
example?


No, but there is not much difference between cases and matrix. Consider:

\definemathmatrix[alignedcase]
[align={right,left,right},distance=3pt,left={\left\{}, 
right={\right.},style=\displaystyle]
\starttext

\startformula
\startalignedcase
  \NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
  \NC {\partial u \over \partial {\bf n} } \NC{} = h(u) \NC \quad\mbox{on 
} \partial\Omega   \NR

\stopalignedcase
\stopformula

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] Math align with \startcases

2009-01-19 Thread Otared Kavian


On 19 janv. 09, at 15:38, Aditya Mahajan wrote:


On Mon, 19 Jan 2009, Otared Kavian wrote:


[...]
So my question is: whether one can use \startcases ...\stopcases  
instead of \startmatrix ... \stopmatrix in order to obtain the  
result of the plain TeX example?


No, but there is not much difference between cases and matrix.  
Consider:


\definemathmatrix[alignedcase]
[align={right,left,right},distance=3pt,left={\left\{},  
right={\right.},style=\displaystyle]

\starttext

\startformula
\startalignedcase
 \NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
 \NC {\partial u \over \partial {\bf n} } \NC{} = h(u) \NC \quad 
\mbox{on } \partial\Omega   \NR

\stopalignedcase
\stopformula

Aditya___


Thanks Aditya: actually an alternative definition in order to get what  
I mentioned in my question is the following:


\starttext
\definemathmatrix[alignedcase]
[align={right,left,left}, %  instead of 
align={right,left,right}
distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]

\startformula
\startalignedcase
 \NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
 \NC {\partial u \over \partial {\bf n} } \NC{} = h(u) \NC \quad 
\mbox{on } \partial\Omega   \NR

\stopalignedcase
\stopformula
\stoptext

Should I add this to the wiki?

Many thanks: OK

___
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] Math align with \startcases

2009-01-19 Thread Aditya Mahajan

On Mon, 19 Jan 2009, Otared Kavian wrote:



On 19 janv. 09, at 15:38, Aditya Mahajan wrote:


On Mon, 19 Jan 2009, Otared Kavian wrote:


[...]
So my question is: whether one can use \startcases ...\stopcases instead 
of \startmatrix ... \stopmatrix in order to obtain the result of the plain 
TeX example?


No, but there is not much difference between cases and matrix. Consider:

\definemathmatrix[alignedcase]
[align={right,left,right},distance=3pt,left={\left\{}, 
right={\right.},style=\displaystyle]

\starttext

\startformula
\startalignedcase
\NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
\NC {\partial u \over \partial {\bf n} } \NC{} = h(u) \NC \quad\mbox{on } 
\partial\Omega   \NR

\stopalignedcase
\stopformula

Aditya___


Thanks Aditya: actually an alternative definition in order to get what I 
mentioned in my question is the following:


\starttext
\definemathmatrix[alignedcase]
		[align={right,left,left}, %  instead of 
align={right,left,right}

distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]

\startformula
\startalignedcase
\NC -\Delta u + g(u) \NC{} = f \NC \quad\mbox{in } \Omega\NR
\NC {\partial u \over \partial {\bf n} } \NC{} = h(u) \NC \quad\mbox{on } 
\partial\Omega   \NR

\stopalignedcase
\stopformula
\stoptext

Should I add this to the wiki?


Please do.

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] Math align with \startcases

2009-01-19 Thread Otared Kavian


On 19 janv. 09, at 19:49, Aditya Mahajan wrote:


On Mon, 19 Jan 2009, Otared Kavian wrote:

[…]
Should I add this to the wiki?


Please do.

Aditya


Done:

http://wiki.contextgarden.net/\startcases

Best regards: OK

___
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
___


[NTG-context] Re: Re : [NTG-context] Re: Re : [NTG-context] Re: Re : [NTG-context] amsl: startcases/stopcases

2004-05-28 Thread Giuseppe Bilotta
Friday, May 28, 2004 David Munger wrote:

  Indeed, I used to like nath a lot, but as I pointed out in this
 thread
  http://www.ntg.nl/pipermail/ntg-context/2004/005306.html
  there are bugs which prevent me from using it at the moment.
 
 Yes, it's still in my TODO list. Sadly, I don't have enough
 time to work on it these days :\

 What you've done so far is already a great piece of work. :) Without
 it, I wouldn't be writing my physics thesis using ConTeXt.

Thank you. Of course most of the work has actually been done by
others so far, and my only job has been that of bringing things
together :)

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Re : [NTG-context] amsl: startcases/stopcases

2004-05-27 Thread Giuseppe Bilotta
Tuesday, May 25, 2004 David Munger wrote:

  Is there some way of telling startcases/stopcases to behave in
 display
  mode?
 
 Yup, I just changed a couple of things and now we have a
 \startbigcases ... \stopbigcases for this. Will upload new
 version soon.

 Oh, great! I'm really looking forward to get this new version. By the
 way, would you be so kind to include some multiline equation
 environment? Something like (or better than)

 \[
   first part of very long equation
   \eqbreak
   second part of very long equation
   \eqbreak
   third part of very long equation
 \]

You want to use the nath module: all equations are multiline:

\[ a= b + \\
   c + d + \\
   e +
\]

You may want to look at the documentation for the nath package
in LaTeX about the use of \wall and \return for alignments
within multiline equations.

-- 
Giuseppe Oblomov Bilotta


___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re : [NTG-context] Re: Re : [NTG-context] amsl: startcases/stopcases

2004-05-27 Thread David Munger
 Oh, great! I'm really looking forward to get this new version. By
the
 way, would you be so kind to include some multiline equation
 environment? Something like (or better than)
 \[
   first part of very long equation
   \eqbreak
   second part of very long equation
   \eqbreak
   third part of very long equation
 \]
You want to use the nath module: all equations are multiline:
Indeed, I used to like nath a lot, but as I pointed out in this thread
http://www.ntg.nl/pipermail/ntg-context/2004/005306.html
there are bugs which prevent me from using it at the moment.
Regards,
David
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Re : [NTG-context] Re: Re : [NTG-context] amsl: startcases/stopcases

2004-05-27 Thread Giuseppe Bilotta
Thursday, May 27, 2004 David Munger wrote:

 Indeed, I used to like nath a lot, but as I pointed out in this thread
 http://www.ntg.nl/pipermail/ntg-context/2004/005306.html
 there are bugs which prevent me from using it at the moment.

Yes, it's still in my TODO list. Sadly, I don't have enough
time to work on it these days :\

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] amsl: startcases/stopcases

2004-05-25 Thread Giuseppe Bilotta
Thursday, May 20, 2004 David Munger wrote:

 Hello Giuseppe,


 I'm having a little trouble with the cases in amsl.

 Compiling this:

 \[
   f(x) =
   \startcases
 0 \text{if $x  -\epsilon$} \\
 \frac12   \text{if $x   \epsilon$}
   \stopcases
 \]

 results in an error around the \frac.

Hello David, sorry for the delay.

The problem is caused by \frac being defined in the newmat
module as

%D Better:

\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}}


If you comment that line, it will compile flawlessly.

Hans, why would you want to allow \frac in text mode?

 Changing it to \dfrac makes the input compile ok, but
 typesets the cases in an ugly manner with really narrow
 spacing.

(Yes.)

 Is there some way of telling startcases/stopcases to behave in display
 mode?

Yup, I just changed a couple of things and now we have a
\startbigcases ... \stopbigcases for this. Will upload new
version soon.

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re : [NTG-context] amsl: startcases/stopcases

2004-05-25 Thread David Munger
 Is there some way of telling startcases/stopcases to behave in
display
 mode?
Yup, I just changed a couple of things and now we have a
\startbigcases ... \stopbigcases for this. Will upload new
version soon.
Oh, great! I'm really looking forward to get this new version. By the  
way, would you be so kind to include some multiline equation  
environment? Something like (or better than)

\[
 first part of very long equation
 \eqbreak
 second part of very long equation
 \eqbreak
 third part of very long equation
\]
which I achieve at the moment by doing
\[
 \startalign
   first part of very long equation
   \hskip 1.5em
   \\ \hfill
   second part of very long equation
   \\ \hfill
   third and part of very long equation
 \stopalign
\]
But this does not work as well I wish. I'd like to substitute the  
'\hskip 1.5 em' after the first line for a '\hfill' so that it always  
be the leftmost line, but the latter does nothing at all. So I have to  
put a '\hskip' and tweak the distance by hand.

Thanks for you help,
David
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] amsl: startcases/stopcases

2004-05-20 Thread David Munger
Hello Giuseppe,
I'm having a little trouble with the cases in amsl.
Compiling this:
\[
 f(x) =
 \startcases
   0 \text{if $x  -\epsilon$} \\
   \frac12   \text{if $x   \epsilon$}
 \stopcases
\]
results in an error around the \frac. Changing it to \dfrac makes the  
input compile ok, but typesets the cases in an ugly manner with really  
narrow spacing.

Is there some way of telling startcases/stopcases to behave in display  
mode?

Thanks in advance,
David
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context