* Math align with \startcases
@ 2009-01-19 10:49 Otared Kavian
2009-01-19 14:38 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Otared Kavian @ 2009-01-19 10:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Math align with \startcases
2009-01-19 10:49 Math align with \startcases Otared Kavian
@ 2009-01-19 14:38 ` Aditya Mahajan
2009-01-19 18:05 ` Otared Kavian
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2009-01-19 14:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2086 bytes --]
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
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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: Math align with \startcases
2009-01-19 14:38 ` Aditya Mahajan
@ 2009-01-19 18:05 ` Otared Kavian
2009-01-19 18:49 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Otared Kavian @ 2009-01-19 18:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Math align with \startcases
2009-01-19 18:05 ` Otared Kavian
@ 2009-01-19 18:49 ` Aditya Mahajan
2009-01-19 21:10 ` Otared Kavian
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2009-01-19 18:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Math align with \startcases
2009-01-19 18:49 ` Aditya Mahajan
@ 2009-01-19 21:10 ` Otared Kavian
0 siblings, 0 replies; 5+ messages in thread
From: Otared Kavian @ 2009-01-19 21:10 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 247 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 702 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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:[~2009-01-19 21:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-19 10:49 Math align with \startcases Otared Kavian
2009-01-19 14:38 ` Aditya Mahajan
2009-01-19 18:05 ` Otared Kavian
2009-01-19 18:49 ` Aditya Mahajan
2009-01-19 21:10 ` Otared Kavian
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).