ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Upright math
Date: Mon, 7 Sep 2009 18:36:57 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0909071828510.9449@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <20090907221443.GA16371@khaled-laptop>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1448 bytes --]

On Tue, 8 Sep 2009, Khaled Hosny wrote:

> On Mon, Sep 07, 2009 at 05:59:33PM -0400, Aditya Mahajan wrote:
>> On Mon, 7 Sep 2009, Khaled Hosny wrote:
>>
>>>
>>> Is there a way (MkIV) to set math to use upright symbols globally, for
>>> Latin and Greek (I'm working on an OpenType math font that has no
>>> italics).
>>
>> There is no interface yet, but you can set math attributes by
>> either explicitly setting them
>>
>> \appendtoks
>>   \setmathattribute{regular}{tf}
>> \to \everymathematics
>>
>> or by redefining mathdefault
>>
>> \unexpanded\def\mathdefault   {\setmathattribute{regular}{tf}}
>
> Thanks for the tip, but this seems not to work for Greek symbols:
>
> \unexpanded\def\mathdefault   {\setmathattribute{regular}{tf}}
> \starttext
> \startformula
> ABC \phi\Phi\Omega
> \stopformula
> \stoptext
>
> Only Latin is upright, but not Greek.

The attributes only works for characters, not macros.

\usetypescript[cambria]
\setupbodyfont[cambria]
\appendtoks
   \setmathattribute{regular}{tf}
\to \everymathematics
\starttext
$ABC αβγδεφ ΦΨ$
\stoptext

The names \alpha \beta etc are currently hardcoded in char-def. The only 
way to change them is to move mathname="alpha" from 0x1D6FC to 0x03B1. Or 
use \greekalpha, \greekbeta etc (essentially taking the text glyphs).

Hans, we need to think of mechanism to switch between upright and italic 
greek letters for the macros.

Aditya

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

  reply	other threads:[~2009-09-07 22:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07 21:23 Khaled Hosny
2009-09-07 21:59 ` Aditya Mahajan
2009-09-07 22:14   ` Khaled Hosny
2009-09-07 22:36     ` Aditya Mahajan [this message]
2009-09-08  8:29       ` Hans Hagen
2009-09-08 14:26         ` Aditya Mahajan
2009-09-08 17:01         ` Khaled Hosny
2009-09-08 20:18           ` Hans Hagen

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=alpine.LNX.2.00.0909071828510.9449@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).