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