ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Math cases
@ 2021-07-22 22:30 Jack Hill
  2021-07-23  4:36 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Hill @ 2021-07-22 22:30 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Math cases
  2021-07-22 22:30 Math cases Jack Hill
@ 2021-07-23  4:36 ` Aditya Mahajan
  2021-07-23 11:03   ` Jack Hill
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2021-07-23  4:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Math cases
  2021-07-23  4:36 ` Aditya Mahajan
@ 2021-07-23 11:03   ` Jack Hill
  0 siblings, 0 replies; 4+ messages in thread
From: Jack Hill @ 2021-07-23 11:03 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Math Cases
@ 2006-01-24  6:22 Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2006-01-24  6:22 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-23 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 22:30 Math cases Jack Hill
2021-07-23  4:36 ` Aditya Mahajan
2021-07-23 11:03   ` Jack Hill
  -- strict thread matches above, loose matches on Subject: below --
2006-01-24  6:22 Math Cases Aditya Mahajan

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).