ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Math cases and text in math mode
@ 2021-07-06 12:22 Jack Hill
  0 siblings, 0 replies; only message in thread
From: Jack Hill @ 2021-07-06 12:22 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-06 12:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 12:22 Math cases and text in math mode Jack Hill

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