Re: [NTG-context] Math alignment question

2022-09-24 Thread Jeong Dal via ntg-context
Dear Hans,


>> Thank you for your explanation.
>> I just wonder \alinghere can be applicable to multiple formula.
>> It is OK to use \NC \NR for multiple formulas.
> What probably can be done, is to let the next formula start with the align of 
> the previous one .. Mikael can add it to our todo
> 

Thank you for your concern.
When we write  two long formula, I think that to use "\alignhere, \breakhere" 
is a little bit simpler than use \NC\NR.
We may write them to use \startformula…\stopformula twice separetely. 
But, then the alignment of two formulas may be different because formula’s 
alignment is midaligned. 

Thanks again to add it todo list.

Best regards,

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-24 Thread Hans Hagen via ntg-context

On 9/24/2022 4:51 PM, Jeong Dal via ntg-context wrote:

Dear Aditya, Mikael,

Thank you for your explanation.
I just wonder \alinghere can be applicable to multiple formula.
It is OK to use \NC \NR for multiple formulas.
What probably can be done, is to let the next formula start with the 
align of the previous one .. Mikael can add it to our todo


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-24 Thread Jeong Dal via ntg-context
Dear Aditya, Mikael,

Thank you for your explanation.
I just wonder \alinghere can be applicable to multiple formula.
It is OK to use \NC \NR for multiple formulas.

Best regards,

Dalyoung


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-23 Thread Mikael Sundqvist via ntg-context
On Fri, Sep 23, 2022 at 8:46 PM Aditya Mahajan via ntg-context
 wrote:
>
> On Thu, 22 Sep 2022, Jeong Dal via ntg-context wrote:
>
> > Dear Mikael and Hans,
> >
> > Recently, you introdued the new command “\alignhere, \breakhere, \skiphere” 
> > which works fine.
> >
> > Since I usually use the following code that is adopted from My 
> > Way(Mathalign.pdf), I’d like to know that there is a way to use 
> > “\alignhere, \breakhere, \skiphere”  for the case below?
> >
> > \startformula\startalign
> > \NC A \NC = 3 \NR
> > \NC B \NC = 5 \NR
> > \stopalign\stopformula
>
> The way I see it is that the current implementation is that it is way to 
> break a _single_ long equation to multiple lines. For multiple equations, you 
> still need to use the \startalign method.
>

Indeed, that is the case. These formulas are done for single chain
equations. The example given above consists of two formulas, and the
new broken formula type simply does not fit. You can play with more
than one \alignhere, but they will only set new align points. I think
\startalign ... \stopalign is the way to go there. If it is cumbersome
to type all the \NC and \NR one could in principle thing of similar
input as for the simple matrices. Your example then would become

\startalign
A, = 3;
B, = 5;
\stopalign

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-23 Thread Aditya Mahajan via ntg-context
On Thu, 22 Sep 2022, Jeong Dal via ntg-context wrote:

> Dear Mikael and Hans,
> 
> Recently, you introdued the new command “\alignhere, \breakhere, \skiphere” 
> which works fine.
> 
> Since I usually use the following code that is adopted from My 
> Way(Mathalign.pdf), I’d like to know that there is a way to use “\alignhere, 
> \breakhere, \skiphere”  for the case below?
> 
> \startformula\startalign
> \NC A \NC = 3 \NR
> \NC B \NC = 5 \NR
> \stopalign\stopformula

The way I see it is that the current implementation is that it is way to break 
a _single_ long equation to multiple lines. For multiple equations, you still 
need to use the \startalign method.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment problem

2022-09-22 Thread Jan-Erik Hägglöf via ntg-context
That was the solution, it worked!

Thank you so much!

/Jan-Erik

> 22 sep. 2022 kl. 14:54 skrev Alexandre Christe via ntg-context 
> :
> 
> Hi Jan-Erik,
> 
> One way I came across searching the mailing list is the following:
> 
> \starttext
> 
> \startitemize [a,columns,joinedup] [n=3,grid=line]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
> 
> \stoptext
> 
> Could be that there is a better way.
> 
> Le jeu. 22 sept. 2022 à 12:57, Jan-Erik Hägglöf via ntg-context 
> mailto:ntg-context@ntg.nl>> a écrit :
> Dear List!
> 
> I do not know how to solve this issue.
> 
> I want the formulas appear on same height, as you can se on the attachment 
> the formula containing a fraction displaces on another vertical position 
> compared to the other equations.
> 
> How do I correct this?
> 
> Code snippet pasted from garden
> 
> \starttext
> 
> \startitemize[a,columns,three]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
> 
> \stoptext
> 
> 
> Thanks in advance
> 
> Jan-Erik
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl  / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> 
> webpage  : https://www.pragma-ade.nl  / 
> http://context.aanhet.net 
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> 
> wiki : https://contextgarden.net 
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl  / 
> https://www.ntg.nl/mailman/listinfo/ntg-context 
> 
> webpage  : https://www.pragma-ade.nl  / 
> http://context.aanhet.net 
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> 
> wiki : https://contextgarden.net 
> ___

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment problem

2022-09-22 Thread Alexandre Christe via ntg-context
Hi Jan-Erik,

One way I came across searching the mailing list is the following:

\starttext

\startitemize [a,columns,joinedup] [n=3,grid=line]
\item $ 56 + 2 \cdot 3 $
\item $ 5-(7) $
\item $ \frac{21}{7} $
\stopitemize

\stoptext

Could be that there is a *better* way.

Le jeu. 22 sept. 2022 à 12:57, Jan-Erik Hägglöf via ntg-context <
ntg-context@ntg.nl> a écrit :

> Dear List!
>
> I do not know how to solve this issue.
>
> I want the formulas appear on same height, as you can se on the attachment
> the formula containing a fraction displaces on another vertical position
> compared to the other equations.
>
> How do I correct this?
>
> Code snippet pasted from garden
>
> \starttext
>
> \startitemize[a,columns,three]
> \item $ 56 + 2 \cdot 3 $
> \item $ 5-(7) $
> \item $ \frac{21}{7} $
> \stopitemize
>
> \stoptext
>
>
> Thanks in advance
>
> Jan-Erik
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 16:47, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:

 I get errors when using \MC - see example below.
 
 The \NR before \stopmathcases is missing in all your examples.

OK. Though I know it, it is hard to get used to, coming from LaTeX.

 But the spacing is wrong: too much between the two components. These are not 
 cases, but aligned formulas: one might have a number of alignments, not just 
 one. And I just happen to use left braces on them.
 
 Take a look at my previous example where I changed the distance between both 
 columns with the distance key.

I missed that. It fixes the spaces within the formula, but adds space between 
the two sets relative both TeX and AMS-LaTeX (which has about the same as TeX), 
cf. example below.

In AMS-LaTeX one can have more than one alignment, though when trying it 
between the “-“ and the “ω” in the second (right-most) set, it adds a lot of 
space, rather than just trying to align a compactly as possible. In ConTeXt, 
nothing happens with extra alignments; in TeX, there is an error.

So using \startmathcases is a workaround: trying to force it to do something it 
wasn’t intended for.


\starttext

\def\equlb#1{\left\{\eqalign{#1}\right.} %equation left braced

\startformula
 J^j:\startmathcases[distance=\spaceamount]\NC ω^0 \MC ↦ 0 \NR \NC ω^j \MC ↦ 0 
\NR \stopmathcases \quad
  \startmathcases[distance=\spaceamount] \NC ω^k \MC ↦ \MC ω^l \NR \NC ω^l \MC 
↦ -\MC ω^k \NR \stopmathcases
\stopformula

\startformula
 J^j:\equlb{ω^0 ↦ 0 \cr ω^j ↦ 0} \quad
 \equlb{ω^k ↦ ω^l \cr ω^l ↦ -ω^k} \stopformula

\stoptext



___
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] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 04:46, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 The spacing is different in cases - TeX also has such a variation. 
 Specifically, there is extra space before the conditionals.
 
 In addition, it seems \startmathcases ... \stopmathcases is not working with 
 UTF-8: in the example below, the ω’s on the second line, after the arrows, 
 disappear in my PDF. 
 This is explained in section 8 of the document:

FYI, the TeX Live 2015 version from 2007 called context-latex-math.pdf does not 
have ch. 8.

 There are two ways of specifying the second column — \MC (Math Column)
 and \NC (New Column). If \MC is used, the second column is in \math mode,
 with \NC it is in ‘text mode’.

I get errors when using \MC - see example below.

But the spacing is wrong: too much between the two components. These are not 
cases, but aligned formulas: one might have a number of alignments, not just 
one. And I just happen to use left braces on them.


\starttext

\startformula
 J^j:\startmathcases\NC ω^0 \MC → 0 \NR \NC ω^j \MC → 0 \stopmathcases \quad
  \startmathcases \NC ω^k \MC → ω^l \NR \NC ω^l \MC → -ω^k \stopmathcases
\stopformula

\stoptext



___
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] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 20:17, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:

 You can set the alignment for each column in a matrix with the align key.
 
 \definemathmatrix
   [aligned]
   [n=2,
align={right,left},
distance=\spaceamount]
 
 \starttext
 
 \startformula
 J^j:
 \startaligned[left=\left\{,right=\right.]
 \NC ω^0 \NC ↦ 0 \NR
 \NC ω^j \NC ↦ 0 \NR
 \stopaligned
 \quad
 \startaligned[n=3,align={right,middle,left},left=\left\{,right=\right.]
 \NC ω^k \NC ↦ \NC  ω^l \NR
 \NC ω^l \NC ↦ \NC -ω^k \NR
 \stopaligned
 \stopformula
 
 \stoptext

That looks like the right thing. Thanks.

Your example is quite close to TeX, cf. example below.

I have also put in an extra alignment to see what happens, monospace code 
alignment style. Changing ‘left’ to ‘right did not seem to have any effect here.


\definemathmatrix
  [aligned]
  [n=2,
   align={right,left},
   distance=\spaceamount]

\starttext

\startformula
  J^j:
  \startaligned[left=\left\{,right=\right.]
\NC ω^0 \NC ↦ 0 \NR
\NC ω^j \NC ↦ 0 \NR
  \stopaligned
  \quad
  \startaligned[n=3,align={right,middle,left},left=\left\{,right=\right.]
\NC ω^k \NC ↦ \NC  \NC ω^l \NR
\NC ω^l \NC ↦ \NC -\NC ω^k \NR
  \stopaligned
\stopformula


\def\equlb#1{\left\{\eqalign{#1}\right.} %equation left braced

\startformula
 J^j:\equlb{ω^0 ↦ 0 \cr ω^j ↦ 0} \quad
 \equlb{ω^k ↦ ω^l \cr ω^l ↦ -ω^k} \stopformula

\stoptext


___
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] Math alignment

2015-07-07 Thread Wolfgang Schuster




Hans Aberg mailto:haber...@telia.com
7. Juli 2015 20:53

On 7 Jul 2015, at 20:17, Wolfgang Schusterschuster.wolfg...@gmail.com  wrote:



You can set the alignment for each column in a matrix with the align key.

\definemathmatrix
   [aligned]
   [n=2,
align={right,left},
distance=\spaceamount]

\starttext

\startformula
 J^j:
 \startaligned[left=\left\{,right=\right.]
 \NC ω^0 \NC ↦ 0 \NR
 \NC ω^j \NC ↦ 0 \NR
 \stopaligned
 \quad
 \startaligned[n=3,align={right,middle,left},left=\left\{,right=\right.]
 \NC ω^k \NC ↦ \NC  ω^l \NR
 \NC ω^l \NC ↦ \NC -ω^k \NR
 \stopaligned
\stopformula

\stoptext


That looks like the right thing. Thanks.

Your example is quite close to TeX, cf. example below.

I have also put in an extra alignment to see what happens, monospace code 
alignment style. Changing ‘left’ to ‘right did not seem to have any effect here.


Can you see the effect of the alignment?

\starttext

\startformula
\startmatrix[align={left,middle,right}]
\NC a   \NC b   \NC c   \NR
\NC aa  \NC bb  \NC cc  \NR
\NC aaa \NC bbb \NC ccc \NR
\stopmatrix
\stopformula

\stoptext

Wolfgang
___
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] Math alignment

2015-07-07 Thread Wolfgang Schuster



Hans Aberg mailto:haber...@telia.com
7. Juli 2015 21:11

On 7 Jul 2015, at 20:17, Wolfgang Schusterschuster.wolfg...@gmail.com  wrote:



You can set the alignment for each column in a matrix with the align key.


FYI, the document amshelp.pdf says that AMS-LaTeX environments align, align*, 
and aligned, can have multiple alignments, and gives this example:
\begin{align*}
   K\approx G * Hi= j+k   B\subset C\\
   H\approx A_{0}*B_{0}   i’= j’+k’   C= D\cap E\\
   G\approx \coprod_{\alpha\in A} L_{\alpha}   i’’=j’’+k’’  A= D \cup E
\end{align*}
which is typeset so that 'K\approx G * H’ is one equation aligned on the ‘’ with 
the others below, followed by 'i= j+k’ in the next column.

So the ampersands have multiple functions here, it seems: alignment and 
separating columns.

Translating into ConTeXt, one might have (pseudocode):
\startformula
   \startalign
 \NC K \NA \approx G * H \NC  i\NA= j+k \NC B \NA \subset C \NR
 \NC H \NA \approx A_{0}*B_{0} \NC   i’\NA= j’+k’ \NC   C \NA = D\cap E\NR
 \NC G \NA \approx \coprod_{\alpha\in A} L_{\alpha}
   \NC   i’’\NA =j’’+k’’ \NC  A \NA = D \cup E \NR
   \stopalign
\stopformula
where I have introduce a symbol \NA for alignment.

You should google for mathalign.pdf which explains and shows examples 
for the matrix, cases etc. environments.


To get the same result as your LaTeX example you can use the m key for 
\startalign.


\starttext

\startformula
\startalign[m=3,distance=3em]
\NC K \NC \approx G * H\NC  i   \NC = 
j+k \NC B \NC \subset C  \NR
\NC H \NC \approx A_{0}*B_{0}  \NC  i'  \NC = 
j'+k'   \NC C \NC = D\cap E  \NR
\NC G \NC \approx \coprod_{\alpha\in A} L_{\alpha} \NC  i'' \NC  
=j''+k'' \NC A \NC = D \cup E \NR

\stopalign
\stopformula

\stoptext

Wolfgang
___
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] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 21:49, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:

 You should google for mathalign.pdf which explains and shows examples for the 
 matrix, cases etc. environments.
 
 To get the same result as your LaTeX example you can use the m key for 
 \startalign.
 
 \starttext
 
 \startformula
 \startalign[m=3,distance=3em]
 \NC K \NC \approx G * H\NC  i   \NC = j+k 
 \NC B \NC \subset C  \NR
 \NC H \NC \approx A_{0}*B_{0}  \NC  i'  \NC = j'+k'   
 \NC C \NC = D\cap E  \NR
 \NC G \NC \approx \coprod_{\alpha\in A} L_{\alpha} \NC  i'' \NC  =j''+k'' 
 \NC A \NC = D \cup E \NR
 \stopalign
 \stopformula
 
 \stoptext

That is where I started - it does not work with \left\{ … \right. :-)


___
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] Math alignment

2015-07-07 Thread Wolfgang Schuster




Hans Aberg mailto:haber...@telia.com
7. Juli 2015 18:23

On 7 Jul 2015, at 16:47, Wolfgang Schusterschuster.wolfg...@gmail.com  wrote:



I get errors when using \MC - see example below.


The \NR before \stopmathcases is missing in all your examples.


OK. Though I know it, it is hard to get used to, coming from LaTeX.


But the spacing is wrong: too much between the two components. These are not 
cases, but aligned formulas: one might have a number of alignments, not just 
one. And I just happen to use left braces on them.


Take a look at my previous example where I changed the distance between both 
columns with the distance key.


I missed that. It fixes the spaces within the formula, but adds space between 
the two sets relative both TeX and AMS-LaTeX (which has about the same as TeX), 
cf. example below.

In AMS-LaTeX one can have more than one alignment, though when trying it 
between the “-“ and the “ω” in the second (right-most) set, it adds a lot of 
space, rather than just trying to align a compactly as possible. In ConTeXt, 
nothing happens with extra alignments; in TeX, there is an error.

So using \startmathcases is a workaround: trying to force it to do something it 
wasn’t intended for.

You can set the alignment for each column in a matrix with the align key.

\definemathmatrix
  [aligned]
  [n=2,
   align={right,left},
   distance=\spaceamount]

\starttext

\startformula
J^j:
\startaligned[left=\left\{,right=\right.]
\NC ω^0 \NC ↦ 0 \NR
\NC ω^j \NC ↦ 0 \NR
\stopaligned
\quad
\startaligned[n=3,align={right,middle,left},left=\left\{,right=\right.]
\NC ω^k \NC ↦ \NC  ω^l \NR
\NC ω^l \NC ↦ \NC -ω^k \NR
\stopaligned
\stopformula

\stoptext

Wolfgang
___
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] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 20:17, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:

 You can set the alignment for each column in a matrix with the align key.

FYI, the document amshelp.pdf says that AMS-LaTeX environments align, align*, 
and aligned, can have multiple alignments, and gives this example:
\begin{align*}
  K \approx G * H   i= j+k  B \subset C\\
  H \approx A_{0}*B_{0}  i’= j’+k’  C = D\cap E\\
  G \approx \coprod_{\alpha\in A} L_{\alpha}  i’’=j’’+k’’ A = D \cup E
\end{align*}
which is typeset so that 'K \approx G * H’ is one equation aligned on the ‘’ 
with the others below, followed by 'i= j+k’ in the next column.

So the ampersands have multiple functions here, it seems: alignment and 
separating columns.

Translating into ConTeXt, one might have (pseudocode):
\startformula
  \startalign
\NC K \NA \approx G * H \NC  i\NA= j+k \NC B \NA \subset C \NR
\NC H \NA \approx A_{0}*B_{0} \NC   i’\NA= j’+k’ \NC   C \NA = D\cap E\NR
\NC G \NA \approx \coprod_{\alpha\in A} L_{\alpha}
  \NC   i’’\NA =j’’+k’’ \NC  A \NA = D \cup E \NR
  \stopalign
\stopformula
where I have introduce a symbol \NA for alignment.


___
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] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 21:18, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:

 I have also put in an extra alignment to see what happens, monospace code 
 alignment style. Changing ‘left’ to ‘right did not seem to have any effect 
 here.
 
 Can you see the effect of the alignment?
 
 \starttext
 
 \startformula
 \startmatrix[align={left,middle,right}]
 \NC a   \NC b   \NC c   \NR
 \NC aa  \NC bb  \NC cc  \NR
 \NC aaa \NC bbb \NC ccc \NR
 \stopmatrix
 \stopformula
 
 \stoptext

Thanks. I know that example. I just noticed it seemed to have no effect in the 
other example, for some reason.


___
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] Math alignment

2015-07-07 Thread Hans Aberg

 On 7 Jul 2015, at 21:49, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:

 You should google for mathalign.pdf which explains and shows examples for the 
 matrix, cases etc. environments.

It looks rather basic, except for last formula of section 9. 

The document amshelp.pdf, ch. 7, has some nice pure math style examples.


___
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] Math alignment

2015-07-07 Thread Wolfgang Schuster




Hans Aberg mailto:haber...@telia.com
7. Juli 2015 10:30

On 7 Jul 2015, at 04:46, Wolfgang Schusterschuster.wolfg...@gmail.com  wrote:


The spacing is different in cases - TeX also has such a variation. 
Specifically, there is extra space before the conditionals.

In addition, it seems \startmathcases ... \stopmathcases is not working with 
UTF-8: in the example below, the ω’s on the second line, after the arrows, 
disappear in my PDF.

This is explained in section 8 of the document:


FYI, the TeX Live 2015 version from 2007 called context-latex-math.pdf does not 
have ch. 8.


 There are two ways of specifying the second column — \MC (Math Column)
 and \NC (New Column). If \MC is used, the second column is in \math mode,
 with \NC it is in ‘text mode’.


I get errors when using \MC - see example below.

The \NR before \stopmathcases is missing in all your examples.

But the spacing is wrong: too much between the two components. These are not 
cases, but aligned formulas: one might have a number of alignments, not just 
one. And I just happen to use left braces on them.

Take a look at my previous example where I changed the distance between 
both columns with the distance key.


Wolfgang
___
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] Math alignment

2015-07-06 Thread Hans Aberg
[I do not get copies from the list, though having signed up.]

Wolfgang Schuster wrote:

 On 6 Jul 2015, at 11:24, Hans Aberg haber...@telia.com wrote:
 
 The example below shows the intended output when using original TeX code 
 (compiled with  ‘context' of TeX Live 2015): a pair of left braced formulas. 
 The first comment shows what works in AMS-LaTeX.
 
 However, when trying similar ConTeXt commands, I get the error shown in the 
 comment below. What ConTeXt command might use here?
 
 Take a look at the wiki page [1] for multiline equations and also the 
 linked PDF at the start of the page.
 
 [1] 
 http://wiki.contextgarden.net/Multiline_equations#Cases

The spacing is different in cases - TeX also has such a variation. 
Specifically, there is extra space before the conditionals.

In addition, it seems \startmathcases ... \stopmathcases is not working with 
UTF-8: in the example below, the ω’s on the second line, after the arrows, 
disappear in my PDF. 


\startformula
 J^j:\startmathcases\NC ω^0 \NC→ 0 \NR \NC ω^j \NC→ 0 \stopmathcases \quad
  \startmathcases \NC ω^k \NC→ ω^l \NR \NC ω^l \NC→ -ω^k \stopmathcases
\stopformula


___
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] Math alignment

2015-07-06 Thread Wolfgang Schuster



Hans Aberg mailto:haber...@telia.com
7. Juli 2015 01:46
[I do not get copies from the list, though having signed up.]


The spacing is different in cases - TeX also has such a variation. 
Specifically, there is extra space before the conditionals.


In addition, it seems \startmathcases ... \stopmathcases is not 
working with UTF-8: in the example below, the ω’s on the second line, 
after the arrows, disappear in my PDF.

This is explained in section 8 of the document:

There are two ways of specifying the second column — \MC (Math Column)
and \NC (New Column). If \MC is used, the second column is in \math 
mode,

with \NC it is in ‘text mode’.


\startformula
J^j:\startmathcases\NC ω^0 \NC→ 0 \NR \NC ω^j \NC→ 0 \stopmathcases \quad
\startmathcases \NC ω^k \NC→ ω^l \NR \NC ω^l \NC→ -ω^k \stopmathcases
\stopformula


Please send always working minimal examples like this:

\starttext

\startformula
J^j :
\startmathcases[distance=\spaceamount]
\NC ω^0 \MC → 0 \NR
\NC ω^j \NC → 0 \NR
\stopmathcases
\quad
\startmathcases[distance=\spaceamount]
\NC ω^k \MC → ω^l \NR
\NC ω^l \MC → -ω^k \NR
\stopmathcases
\stopformula

\stoptext

Wolfgang
___
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] math alignment broken? (was \startmathalignment vertical spacing)

2010-05-19 Thread Taco Hoekwater

Alan BRASLAU wrote:

Is \startformula\startalign\stopalign\stopformula broken in context mkiv?

After just updating the minimals, I now get (using the example below):


See this thread:

http://archive.contextgarden.net/message/20100513.211849.e7079712.en.html

There will be a new current soon, fixing this and a host of other bugs.

Best wishes,
Taco

___
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] Math Alignment - start equation at left margin

2009-12-15 Thread Aditya Mahajan

On Sun, 29 Nov 2009, Curiouslearn wrote:


Hi,
Can someone please help with the alignment of  the equation so that it
starts at left. I tried flushleft and other options (such as without
\NC \NR, with align=left etc.). None of them result in the equation
starting at the left margin. The equation is either placed in the
middle or is aligned to the right. I want it to start at the left.

Thanks.

\setuppapersize[letter][letter]

\starttext

\startformula\startalign[align={left}]
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 
4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
\stopalign\stopformula

\stoptext


The correct way to do this is

\setupformulas[align=flushleft]

\starttext
\startformula
  a = b
\stopformula
\stoptext

However, this does not work in MkIV due to a bug introduced in the 
splitting of mkii-mkiv files. math alignment works using commands


\def\startinnermath
  {\getvalue{\e!start\??fm\formulaparameter\c!align}}

\def\stopinnermath
  {\getvalue{\e!stop \??fm\formulaparameter\c!align}}

which are defined in math-ali.mkiv. However, strc-mat.mkiv redefines these 
to \empty, so the simple math alignment does not work anymore.


Hans: we need to either move these definitions from math-ali to strc-mat 
or remove


\let\startinnermath\empty
\let\stopinnermath \empty

from strc-mat.mkiv

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
___


Re: [NTG-context] Math Alignment - start equation at left margin

2009-12-15 Thread Hans Hagen

Aditya Mahajan wrote:

Hans: we need to either move these definitions from math-ali to strc-mat 
or remove


\let\startinnermath\empty
\let\stopinnermath \empty

from strc-mat.mkiv


ok, removed

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] Math Alignment - start equation at left margin

2009-12-15 Thread Curiouslearn
I had tried using \setupformulas, but it did not work when I posted my
question. I suppose it was for the reason you mentioned. I will try it
again, once I have downloaded the latest beta.

Thanks.

On Tue, Dec 15, 2009 at 6:41 AM, Aditya Mahajan adit...@umich.edu wrote:
 On Sun, 29 Nov 2009, Curiouslearn wrote:

 Hi,
 Can someone please help with the alignment of  the equation so that it
 starts at left. I tried flushleft and other options (such as without
 \NC \NR, with align=left etc.). None of them result in the equation
 starting at the left margin. The equation is either placed in the
 middle or is aligned to the right. I want it to start at the left.

 Thanks.

 \setuppapersize[letter][letter]

 \starttext

 \startformula\startalign[align={left}]
                                \NC\text{\bf Example: }
  \frac{d(4x^{2})}{dx} = 4
 \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
 \stopalign\stopformula

 \stoptext

 The correct way to do this is

 \setupformulas[align=flushleft]

 \starttext
 \startformula
  a = b
 \stopformula
 \stoptext

 However, this does not work in MkIV due to a bug introduced in the splitting
 of mkii-mkiv files. math alignment works using commands

 \def\startinnermath
  {\getvalue{\e!start\??fm\formulaparameter\c!align}}

 \def\stopinnermath
  {\getvalue{\e!stop \??fm\formulaparameter\c!align}}

 which are defined in math-ali.mkiv. However, strc-mat.mkiv redefines these
 to \empty, so the simple math alignment does not work anymore.

 Hans: we need to either move these definitions from math-ali to strc-mat or
 remove

 \let\startinnermath\empty
 \let\stopinnermath \empty

 from strc-mat.mkiv

 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
 ___

___
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] Math Alignment - start equation at left margin

2009-11-30 Thread Curiouslearn
Otared, thanks very much for bringing Aditya's article to my
attention. The method worked well.



On Mon, Nov 30, 2009 at 2:50 AM, Otared Kavian ota...@gmail.com wrote:
 Sorry for sending this again: I forgot a closing } in  \type{FLalign]…)}…
 Hi,
 Is this what you want to achieve:
 %% begin
 \starttext
 From Aditya's \type{mathalign.pdf}, where he defines in fact a
 \type{\definemathalignment[flalign]},
 (but I prefer \type{FLalign]…)} one has
 \definemathalignment[FLalign] [m=2, distance=5em plus 1 fil] %We need to set
 a default value for m
 Curiouslearn'  input was:
 \startformula
 \startalign
 \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
 \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
 \stopalign
 \stopformula
 \startformula
 \startFLalign %% here you can add [m=2] or [m=3] if you need more columns
 \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
 \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC \NC \NR %% note twice \NC
 \stopFLalign
 \stopformula
 \stoptext
 %% end
 Best regards: OK
 On 30 nov. 2009, at 00:45, Curiouslearn wrote:

 Hi,
 Can someone please help with the alignment of  the equation so that it
 starts at left. I tried flushleft and other options (such as without
 \NC \NR, with align=left etc.). None of them result in the equation
 starting at the left margin. The equation is either placed in the
 middle or is aligned to the right. I want it to start at the left.

 Thanks.

 \setuppapersize[letter][letter]

 \starttext

 \startformula\startalign[align={left}]
 \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
 \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
 \stopalign\stopformula

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

 %%
 Otared Kavian
 Département de Mathématiques
 Université de Versailles Saint-Quentin
 Bâtiment Fermat
 45 aveue des Etats Unis
 78035 Versailles cedex
 Téléphone: +33 1 39 25 46 42
 Secrétariat: +33 1 39 25 46 44
 Secrétariat: +33 1 39 25 46 46
 e-mail: otared.kav...@math.uvsq.fr



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


___
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] Math Alignment - start equation at left margin

2009-11-29 Thread Otared Kavian
Hi,

Is this what you want to achieve:

%% begin
\starttext

From Aditya's \type{mathalign.pdf}, where he defines in fact a 
\type{\definemathalignment[flalign]}, 
(but I prefer \type{FLalign]…) one has

\definemathalignment[FLalign] [m=2, distance=5em plus 1 fil] %We need to set a 
default value for m

Curiouslearn'  input was:
\startformula
\startalign
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
\stopalign
\stopformula

\startformula
\startFLalign %% here you can add [m=2] or [m=3] if you need more columns
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC \NC \NR %% note twice \NC
\stopFLalign
\stopformula

\stoptext
%% end

Best regards: OK

On 30 nov. 2009, at 00:45, Curiouslearn wrote:

 Hi,
 Can someone please help with the alignment of  the equation so that it
 starts at left. I tried flushleft and other options (such as without
 \NC \NR, with align=left etc.). None of them result in the equation
 starting at the left margin. The equation is either placed in the
 middle or is aligned to the right. I want it to start at the left.
 
 Thanks.
 
 \setuppapersize[letter][letter]
 
 \starttext
 
 \startformula\startalign[align={left}]
   \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 
 4
 \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
 \stopalign\stopformula
 
 \stoptext
 ___
 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
 ___

%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: otared.kav...@math.uvsq.fr



___
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] Math Alignment - start equation at left margin

2009-11-29 Thread Otared Kavian
Sorry for sending this again: I forgot a closing } in  \type{FLalign]…)}…

Hi,

Is this what you want to achieve:

%% begin
\starttext

From Aditya's \type{mathalign.pdf}, where he defines in fact a 
\type{\definemathalignment[flalign]}, 
(but I prefer \type{FLalign]…)} one has

\definemathalignment[FLalign] [m=2, distance=5em plus 1 fil] %We need to set a 
default value for m

Curiouslearn'  input was:
\startformula
\startalign
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
\stopalign
\stopformula

\startformula
\startFLalign %% here you can add [m=2] or [m=3] if you need more columns
\NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 4
\frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC \NC \NR %% note twice \NC
\stopFLalign
\stopformula

\stoptext
%% end

Best regards: OK

On 30 nov. 2009, at 00:45, Curiouslearn wrote:

 Hi,
 Can someone please help with the alignment of  the equation so that it
 starts at left. I tried flushleft and other options (such as without
 \NC \NR, with align=left etc.). None of them result in the equation
 starting at the left margin. The equation is either placed in the
 middle or is aligned to the right. I want it to start at the left.
 
 Thanks.
 
 \setuppapersize[letter][letter]
 
 \starttext
 
 \startformula\startalign[align={left}]
   \NC\text{\bf Example: }  \frac{d(4x^{2})}{dx} = 
 4
 \frac{dx^{2}}{dx} = 4 (2x) = 8x.\NC{ }\NR
 \stopalign\stopformula
 
 \stoptext
 ___
 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
 ___

%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: otared.kav...@math.uvsq.fr



___
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] Math alignment problem

2009-01-19 Thread Aditya Mahajan

On Tue, 20 Jan 2009, Marcin Borkowski wrote:


Dnia Sat, Jan 10, 2009 at 07:14:58PM -0500, Aditya Mahajan napisa#322;(a):

On Sat, 10 Jan 2009, Marcin Borkowski wrote:


Hi all,

I'd like to typeset a system of simultaneous equations.  I want it to
have a brace on the left (like cases), but inside I want it to have
two columns aligned like align.  Also, I'd like to have the vertical
space between the equations be small (like in cases), not so big as in
align.

How to do this?


(answers cut)

Thank you very much.  But one thing still puzzles me: the vertical
distance between the cases.  How to increase it?  (Shouldn't there be a
parameter for this?  But I couldn't find one...)


For matrix, the current definition works hard so that you cannot change 
vertical distance. For simultaneous equations, you need a math strucutre 
which ConTeXt does not provide.


From what I understand amsmath hasthere are three kinds of math 

strucures

1. Outer display structures (equation, align, gather, and multline)
2. Inner display structures (aligned, gathered, and multlined (provided by 
mathtools package))

3. Inner inline structures (matrix, cases, etc).

The first two display structures have \displaystyle set and have loose 
spacing. The last inline structure has no \displaystyle set and has 
tight spacing. So, what you need for simultaneous equations is something 
from class 2 with the ability to put a brace on the left (empheq package 
in latex allows you to do this with aligned, etc).


Currently, ConTeXt does not provide anything of class 2. It is easy to 
provide it (one just needs to copy the definitions of mathalign but not 
set the width of hbox to be textwidth), but everytime I start working on 
it I get distracted by the bigger problem---ConTeXt is not as good as it 
can be for outer display.


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 alignment problem

2009-01-10 Thread Aditya Mahajan

On Sat, 10 Jan 2009, Marcin Borkowski wrote:


Hi all,

I'd like to typeset a system of simultaneous equations.  I want it to
have a brace on the left (like cases), but inside I want it to have
two columns aligned like align.  Also, I'd like to have the vertical
space between the equations be small (like in cases), not so big as in
align.

How to do this?


I do not completely understand what you want. Do the following give the 
desired output.


\starttext

\startformula
  \startcases[align={right,left},distance=3pt]
\NC 2x + 3y \MC{} = 10 \NR
\NC 3x + 2y \MC{} = 5   \NR
  \stopcases
\stopformula

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

\NC 2x + 3y \NC{} = 10 \NR
\NC 3x + 2y \NC{} = 5   \NR
  \stopmatrix
\stopformula

\stoptext

The {} after the alignment \NC is useful if the next symbol is something 
that can be a uniary or binary symbol (eg, + or -). The {} tells tex to 
treat is as a binary symbol.


If you frequently need something like this, you can use 
definemathcases/definemathmatrix to define a new environment with 
appropriate parameters.


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 alignment problem

2009-01-10 Thread Marcin Borkowski
Dnia Sat, Jan 10, 2009 at 01:15:28PM -0500, Aditya Mahajan napisa#322;(a):
 On Sat, 10 Jan 2009, Marcin Borkowski wrote:
 
 Hi all,
 
 I'd like to typeset a system of simultaneous equations.  I want it to
 have a brace on the left (like cases), but inside I want it to have
 two columns aligned like align.  Also, I'd like to have the vertical
 space between the equations be small (like in cases), not so big as in
 align.
 
 How to do this?
 
 I do not completely understand what you want. Do the following give the 
 desired output.

Sorry;).

 \starttext
 
 \startformula
   \startcases[align={right,left},distance=3pt]
 \NC 2x + 3y \MC{} = 10 \NR
 \NC 3x + 2y \MC{} = 5   \NR
   \stopcases
 \stopformula
 
 \startformula
   \startmatrix[align={right,left},distance=3pt,left={\left\{}, 
 right={\right.}]
 \NC 2x + 3y \NC{} = 10 \NR
 \NC 3x + 2y \NC{} = 5   \NR
   \stopmatrix
 \stopformula
 
 \stoptext

Both work just fine, but with distance=0pt instead.  Thanks!  There is
only a minor problem with the former one: it's somehow shifted to the
left compared with the latter (both in MkII and MkIV).  I have no idea
why.

 The {} after the alignment \NC is useful if the next symbol is something 
 that can be a uniary or binary symbol (eg, + or -). The {} tells tex to 
 treat is as a binary symbol.

Of course - the {} is an ord atom for TeX, AFAIR.

 If you frequently need something like this, you can use 
 definemathcases/definemathmatrix to define a new environment with 
 appropriate parameters.

Yes; however, I'd still have to use the {} after the \NC...

 
 Aditya

Thank you!

-- 
Marcin Borkowski (http://mbork.pl)

Nie mam w ręku miecza, ani karabinu, stoję nieuzbrojony pod murami Babilonu.
Wzywam pomocy Ducha - Duch przychodzi w ogniu!
Wokół zostają tylko gruzy Babilonu!
(Korzeń Z Kraju Melchizedeka)
___
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 alignment problem

2009-01-10 Thread Aditya Mahajan

On Sat, 10 Jan 2009, Marcin Borkowski wrote:


Dnia Sat, Jan 10, 2009 at 01:15:28PM -0500, Aditya Mahajan napisa#322;(a):

On Sat, 10 Jan 2009, Marcin Borkowski wrote:


Hi all,

I'd like to typeset a system of simultaneous equations.  I want it to
have a brace on the left (like cases), but inside I want it to have
two columns aligned like align.  Also, I'd like to have the vertical
space between the equations be small (like in cases), not so big as in
align.

How to do this?


I do not completely understand what you want. Do the following give the
desired output.


Sorry;).


\starttext

\startformula
  \startcases[align={right,left},distance=3pt]
\NC 2x + 3y \MC{} = 10 \NR
\NC 3x + 2y \MC{} = 5   \NR
  \stopcases
\stopformula

\startformula
  \startmatrix[align={right,left},distance=3pt,left={\left\{},
right={\right.}]
\NC 2x + 3y \NC{} = 10 \NR
\NC 3x + 2y \NC{} = 5   \NR
  \stopmatrix
\stopformula

\stoptext


Both work just fine, but with distance=0pt instead.  Thanks!  There is
only a minor problem with the former one: it's somehow shifted to the
left compared with the latter (both in MkII and MkIV).  I have no idea
why.


mathcases has a numberdistance key, which adds some width at the end of 
each row. You can set numberdistance to zero.



The {} after the alignment \NC is useful if the next symbol is something
that can be a uniary or binary symbol (eg, + or -). The {} tells tex to
treat is as a binary symbol.


Of course - the {} is an ord atom for TeX, AFAIR.


If you frequently need something like this, you can use
definemathcases/definemathmatrix to define a new environment with
appropriate parameters.


Yes; however, I'd still have to use the {} after the \NC...


Yes. You can define something like \OC (ord column) to be \NC{}.

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
___