ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jack Hill <jackhill3103@gmail.com>
To: ntg-context@ntg.nl
Subject: Math cases and text in math mode
Date: Tue, 6 Jul 2021 13:22:57 +0100	[thread overview]
Message-ID: <56368a8c-00f7-6e69-afae-52c18ed94580@gmail.com> (raw)

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
___________________________________________________________________________________

                 reply	other threads:[~2021-07-06 12:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56368a8c-00f7-6e69-afae-52c18ed94580@gmail.com \
    --to=jackhill3103@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).