ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Upright math
@ 2009-09-07 21:23 Khaled Hosny
  2009-09-07 21:59 ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Khaled Hosny @ 2009-09-07 21:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]


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

Another slightly related issue, is it possible to get some visual
indication of missing glyphs, something like using .notdef char instead
of just leaving it blank.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

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

* Re: Upright math
  2009-09-07 21:23 Upright math Khaled Hosny
@ 2009-09-07 21:59 ` Aditya Mahajan
  2009-09-07 22:14   ` Khaled Hosny
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2009-09-07 21:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

> Another slightly related issue, is it possible to get some visual
> indication of missing glyphs, something like using .notdef char instead
> of just leaving it blank.

I don't know.

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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Upright math
  2009-09-07 21:59 ` Aditya Mahajan
@ 2009-09-07 22:14   ` Khaled Hosny
  2009-09-07 22:36     ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Khaled Hosny @ 2009-09-07 22:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 929 bytes --]

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.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

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

* Re: Upright math
  2009-09-07 22:14   ` Khaled Hosny
@ 2009-09-07 22:36     ` Aditya Mahajan
  2009-09-08  8:29       ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2009-09-07 22:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

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

* Re: Upright math
  2009-09-07 22:36     ` Aditya Mahajan
@ 2009-09-08  8:29       ` Hans Hagen
  2009-09-08 14:26         ` Aditya Mahajan
  2009-09-08 17:01         ` Khaled Hosny
  0 siblings, 2 replies; 8+ messages in thread
From: Hans Hagen @ 2009-09-08  8:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:

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

ok. actually, it's not that hard to do, and i'd also provide an 0x1D6FC 
-> 0x03B1 and vise versa transformation then (on unicode chars) ... so, 
you can start thinking about proper names for the commands (\ugreek, 
\igreek or so); are there more such up/it things?

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Upright math
  2009-09-08  8:29       ` Hans Hagen
@ 2009-09-08 14:26         ` Aditya Mahajan
  2009-09-08 17:01         ` Khaled Hosny
  1 sibling, 0 replies; 8+ messages in thread
From: Aditya Mahajan @ 2009-09-08 14:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 8 Sep 2009, Hans Hagen wrote:

> Aditya Mahajan wrote:
>
>> 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.
>
>ok. actually, it's not that hard to do,


>  and i'd also provide an 0x1D6FC -> 0x03B1 and vise versa transformation 
> then (on unicode chars)

As long as there is  still some way of getting 0x1D6FC in the output.

>... so, you can 
> start thinking about proper names for the commands (\ugreek, \igreek or so);

I would prefer long names, say

\uprightalpha, \italicalpha, etc

or

\mathuprightalpha, \mathitalicalpha

Since, the user will usually just type \alpha, the long names should not 
be a problem.

> are there more such up/it things?

The differential operator has various conventions (upright, italic), but 
unicode only provides the double struck version (0x2145, and 0x2146)

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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Upright math
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Khaled Hosny @ 2009-09-08 17:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1075 bytes --]

On Tue, Sep 08, 2009 at 10:29:04AM +0200, Hans Hagen wrote:
> Aditya Mahajan wrote:
>
>> 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.
>
> ok. actually, it's not that hard to do, and i'd also provide an 0x1D6FC  
> -> 0x03B1 and vise versa transformation then (on unicode chars) ... so,  
> you can start thinking about proper names for the commands (\ugreek,  
> \igreek or so); are there more such up/it things?

I was thinking in a global way to switch upright math on/off, my use
case is that on day when we have Euler OpenType, users can use the font
and switch math to upright symbols globally without altering existing
math formulas.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

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

* Re: Upright math
  2009-09-08 17:01         ` Khaled Hosny
@ 2009-09-08 20:18           ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2009-09-08 20:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> On Tue, Sep 08, 2009 at 10:29:04AM +0200, Hans Hagen wrote:
>> Aditya Mahajan wrote:
>>
>>> 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.
>> ok. actually, it's not that hard to do, and i'd also provide an 0x1D6FC  
>> -> 0x03B1 and vise versa transformation then (on unicode chars) ... so,  
>> you can start thinking about proper names for the commands (\ugreek,  
>> \igreek or so); are there more such up/it things?
> 
> I was thinking in a global way to switch upright math on/off, my use
> case is that on day when we have Euler OpenType, users can use the font
> and switch math to upright symbols globally without altering existing
> math formulas.

an upcoming beta will provide such a feature

\usetypescript[cambria]\setupbodyfont[cambria]

\startTEXpage
     $\alpha \mathgreekupright \alpha \mathgreekitalic \alpha$
\stopTEXpage

and also:

\setupmathematics[greek=normal|italic|none]

but first aditya and i need to agree on the names and complete the 
related greek vector


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2009-09-08 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-07 21:23 Upright math Khaled Hosny
2009-09-07 21:59 ` Aditya Mahajan
2009-09-07 22:14   ` Khaled Hosny
2009-09-07 22:36     ` Aditya Mahajan
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

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