Re: [NTG-context] Math cases

2021-07-23 Thread Jack Hill

Thank you.
I've updated the wiki to reflect those changes. The wiki's version of 
ConTeXt still seems to use the old \NC and \MC commands though.


Jack
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Math cases

2021-07-22 Thread Aditya Mahajan
On Thu, 22 Jul 2021, Jack Hill wrote:

> Dear list,
> 
> I'm using ConTeXt version 2021.07.22 19:16 and the following code 
> typesets both columns in math mode
> 
> \starttext
> \startformula
> \delta_{ij} =
> \startcases
> \NC 1 \NC if i = j \NR
> \NC 0 \NC otherwise \NR
> \stopcases
> \stopformula
> \stoptext
> 
> The wiki states that the second column should be typeset in text mode. 
> Is this a bug or does ConTeXt now typeset the second column in math mode 
> by default?

Yes, we felt that it was more consistent with other align mechanisms to default 
to math. So, for the 2nd column, we now have \NC for a "normal" (i.e., math) 
column and \TC for a text column. So you can use:

\startformula
\delta_{ij} =
\startcases  
\NC 1 \TC if $i = j$ \NR
\NC 0 \TC otherwise \NR
\stopcases 
\stopformula   
\stoptext  

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Math cases

2021-07-22 Thread Jack Hill

Dear list,

I'm using ConTeXt version 2021.07.22 19:16 and the following code 
typesets both columns in math mode


\starttext
\startformula
\delta_{ij} =
\startcases
\NC 1 \NC if i = j \NR
\NC 0 \NC otherwise \NR
\stopcases
\stopformula
\stoptext

The wiki states that the second column should be typeset in text mode. 
Is this a bug or does ConTeXt now typeset the second column in math mode 
by default?


Thanks,
Jack
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Math cases and text in math mode

2021-07-06 Thread Jack Hill

Hi,

I have two separate issues here. First, I'm struggling to get math cases 
to work. The wiki suggests that the following code


\starttext
\startformula
 f(x) = \startmathcases
   \NC x, \NC if $0 \le x \le \frac12$ \NR
   \NC 1-x ,\NC if $\frac12 \le x \le 1$ \NR
\stopmathcases
\stopformula
\stoptext

should typeset everything after the \NC in text mode, but when I compile 
it's still in math mode. Is this a bug or is the wiki out of date?



Secondly, how can I enter text mode whilst in a formula, whilst also 
only using the roman font? For example, I would like it so that even if 
the whole text is wrapped in {\em ...}, the text in the formulae are in 
roman font. I've tried the following:


\starttext
{\em
\startformula \startalign[align=left]
\NC {\rm multiple words of text} \NR % Does not provide spacing

\NC \mathrm{multiple words of text} \NR % Does not provide spacing

\NC \text{multiple words of text} \NR % Still italicised

% \NC \text{\rm multiple words of text} \NR % Error

% \NC {\rm \text{multiple words of text}} \NR % Error
\stopalign \stopformula
}
\stoptext

Thanks,
Jack
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Math Cases

2006-01-23 Thread Aditya Mahajan
Is it possible to number each part of the cases environment. I want

\startformula
a = \cases{
   b,  \text{ if something} \cr
   c,  \text{ if something else} \cr}
\stopformula

to come out as
   { b   if something (1)
  a =  {
   { c   if something else(2)

Also, is it possible to have subnumbered equations, that is can I get 
(1a) and (1b) instead of (1) and (2).

Thanks,
Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context