ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Opentype features and space after comma in math mode
@ 2016-08-29 18:20 Jose Luis Arellano
  2016-08-29 20:45 ` Jose Luis Arellano
  0 siblings, 1 reply; 11+ messages in thread
From: Jose Luis Arellano @ 2016-08-29 18:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello list,
Two questions:

1) How can i enable opentype features (onum, lnum, tnum) in math mode?
2) How can i avoid the space after comma in math mode?

I tried this without success:

\definefontfeature[default][default][onum=yes,lnum=no,tnum=no]
\definefontfeature[lnum][default][onum=yes,lnum=no,tnum=no,mode=base]
\definefontfamily[mainface][serif][TeX Gyre Pagella]
\definefontfamily[mainface][math][TeX Gyre Pagella Math][features=lnum]
\setupbodyfont[mainface]

\starttext
1,123\par
\m{1,123}\par
\stoptext

Thanks in advance...
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2016-08-29 18:20 Opentype features and space after comma in math mode Jose Luis Arellano
@ 2016-08-29 20:45 ` Jose Luis Arellano
  2016-08-29 21:02   ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Jose Luis Arellano @ 2016-08-29 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

After some research, i founded (in Wiki) that space after a comma can
be avoided using: \setupmathematics[autopunctuation=all]. Sorry for
that.

So, only left second question. This is about opentype features,
specifically tabular numbers in math mode. This issue (i think) is
related to the commercial font that am using, because it have some OT
features enabled by default (eg: onum=yes, tnum=no and lnum=no).
Curious is that i can only set lnum and onum but not tnum in math.
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2016-08-29 20:45 ` Jose Luis Arellano
@ 2016-08-29 21:02   ` Wolfgang Schuster
  2016-08-29 21:22     ` Jose Luis Arellano
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2016-08-29 21:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Jose Luis Arellano <mailto:jose.4rellano@gmail.com>
> 29. August 2016 um 22:45
> After some research, i founded (in Wiki) that space after a comma can
> be avoided using: \setupmathematics[autopunctuation=all]. Sorry for
> that.
>
> So, only left second question. This is about opentype features,
> specifically tabular numbers in math mode. This issue (i think) is
> related to the commercial font that am using, because it have some OT
> features enabled by default (eg: onum=yes, tnum=no and lnum=no).
Do you use Minion Math?
> Curious is that i can only set lnum and onum but not tnum in math.
Does this work (untested)?

\definefontfamily[inlinemath][mode=base,lnum=yes] % tnum=yes etc.

\definefontfamily[…][mm][…][tf=features:inlinemath]

BTW: You can list all features of a font with "mtxrun --script fonts 
--list --info <fontname>".

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2205 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2016-08-29 21:02   ` Wolfgang Schuster
@ 2016-08-29 21:22     ` Jose Luis Arellano
  2016-08-29 21:43       ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Jose Luis Arellano @ 2016-08-29 21:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

2016-08-29 18:02 GMT-03:00 Wolfgang Schuster <schuster.wolfgang@gmail.com>:
> Do you use Minion Math?
No, am using another commercial font (Fedra Serif B Pro) without math
support and \definefallbackfamily.
> Does this work (untested)?
No.
This is what am using:

\definefontfeature[default][default][tnum=yes,lnum=yes]
\definefontfeature[mathdigits][default][mode=base,tnum=yes,lnum=yes]
\definefontfamily[mainface][serif][...]
\definefallbackfamily[mainface][math][...][preset=math:digitsnormal,features=mathdigits]
\definefontfamily[mainface][math][DejaVu Math]
\setupbodyfont[mainface,10pt]

\starttext
0123456789\par
\m{0123456789}
\stoptext

You can see the result in the attached PDF.

[-- Attachment #2: numbers.pdf --]
[-- Type: application/pdf, Size: 7267 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2016-08-29 21:22     ` Jose Luis Arellano
@ 2016-08-29 21:43       ` Wolfgang Schuster
  2016-08-29 22:31         ` Jose Luis Arellano
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2016-08-29 21:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Jose Luis Arellano <mailto:jose.4rellano@gmail.com>
> 29. August 2016 um 23:22
> 2016-08-29 18:02 GMT-03:00 Wolfgang Schuster<schuster.wolfgang@gmail.com>:
>> Do you use Minion Math?
> No, am using another commercial font (Fedra Serif B Pro) without math
> support and \definefallbackfamily.
You last example was misleading because you tried to change the features 
of the math font.
>> Does this work (untested)?
> No.
> This is what am using:
>
> \definefontfeature[default][default][tnum=yes,lnum=yes]
> \definefontfeature[mathdigits][default][mode=base,tnum=yes,lnum=yes]
> \definefontfamily[mainface][serif][...]
> \definefallbackfamily[mainface][math][...][preset=math:digitsnormal,features=mathdigits]
> \definefontfamily[mainface][math][DejaVu Math]
> \setupbodyfont[mainface,10pt]
>
> \starttext
> 0123456789\par
> \m{0123456789}
> \stoptext
>
> You can see the result in the attached PDF.
I can reproduce it with one of my fonts but have no solution for it.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2472 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2016-08-29 21:43       ` Wolfgang Schuster
@ 2016-08-29 22:31         ` Jose Luis Arellano
  2017-06-02  4:40           ` Jose Luis Arellano
  0 siblings, 1 reply; 11+ messages in thread
From: Jose Luis Arellano @ 2016-08-29 22:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Thanks Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 74 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2016-08-29 22:31         ` Jose Luis Arellano
@ 2017-06-02  4:40           ` Jose Luis Arellano
  2017-06-02  5:40             ` Pablo Rodriguez
  0 siblings, 1 reply; 11+ messages in thread
From: Jose Luis Arellano @ 2017-06-02  4:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear Wolfgang.

In recents versions of Context, what is the correct way to use lnum feature
in maths?

This doesn't works anymore:

\definefontfeature[mathdigits][default][mode=base,tnum=yes,lnum=yes]
\definefallbackfamily[mainface][math][...][preset=math:digitsnormal,features
=mathdigits]

Thanks in advance.

2016-08-29 19:31 GMT-03:00 Jose Luis Arellano <jose.4rellano@gmail.com>:

> Thanks Wolfgang
>

[-- Attachment #1.2: Type: text/html, Size: 1976 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2017-06-02  4:40           ` Jose Luis Arellano
@ 2017-06-02  5:40             ` Pablo Rodriguez
  2017-06-02  7:47               ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Pablo Rodriguez @ 2017-06-02  5:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 06/02/2017 06:40 AM, Jose Luis Arellano wrote:
> Dear Wolfgang.
> 
> In recents versions of Context, what is the correct way to use lnum
> feature in maths?
> 
> This doesn't works anymore:
> 
> \definefontfeature[mathdigits][default][mode=base,tnum=yes,lnum=yes]

José Luis,

I think that line should read:

    \definefontfeature[mathdigits][mode=base,tnum=yes,lnum=yes]

But without a sample, I’m afraid I cannot test it.

Just in case it might help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 11+ messages in thread

* Re: Opentype features and space after comma in math mode
  2017-06-02  5:40             ` Pablo Rodriguez
@ 2017-06-02  7:47               ` Hans Hagen
  2017-06-03  7:58                 ` Jose Luis Arellano
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2017-06-02  7:47 UTC (permalink / raw)
  To: ntg-context

On 6/2/2017 7:40 AM, Pablo Rodriguez wrote:
> On 06/02/2017 06:40 AM, Jose Luis Arellano wrote:
>> Dear Wolfgang.
>>
>> In recents versions of Context, what is the correct way to use lnum
>> feature in maths?
>>
>> This doesn't works anymore:
>>
>> \definefontfeature[mathdigits][default][mode=base,tnum=yes,lnum=yes]
> 
> José Luis,
> 
> I think that line should read:
> 
>      \definefontfeature[mathdigits][mode=base,tnum=yes,lnum=yes]
> 
> But without a sample, I’m afraid I cannot test it.
> 
> Just in case it might help,
> 
> Pablo
most math setups have an (unset) mathextra featureset that you can use 
for such extra features and indeed one should not inherit from defult

   \definefontfeature[mathdigits][tnum=yes,lnum=yes]

of course it also depends on what a font provides (if we're talking 
alternates one can also use the normal 'alternates' feature switching in 
math)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2017-06-02  7:47               ` Hans Hagen
@ 2017-06-03  7:58                 ` Jose Luis Arellano
  2017-06-03  9:27                   ` Pablo Rodriguez
  0 siblings, 1 reply; 11+ messages in thread
From: Jose Luis Arellano @ 2017-06-03  7:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Thanks guys, but unfortunately the code provided doesn't works.

\definefontfeature[mathdigits][mode=base,tnum=yes,lnum=yes]
\definefontfeature[mathdigits][tnum=yes,lnum=yes]

2017-06-02 3:47 GMT-04:00 Hans Hagen <pragma@wxs.nl>:

> On 6/2/2017 7:40 AM, Pablo Rodriguez wrote:
>
>> On 06/02/2017 06:40 AM, Jose Luis Arellano wrote:
>>
>>> Dear Wolfgang.
>>>
>>> In recents versions of Context, what is the correct way to use lnum
>>> feature in maths?
>>>
>>> This doesn't works anymore:
>>>
>>> \definefontfeature[mathdigits][default][mode=base,tnum=yes,lnum=yes]
>>>
>>
>> José Luis,
>>
>> I think that line should read:
>>
>>      \definefontfeature[mathdigits][mode=base,tnum=yes,lnum=yes]
>>
>> But without a sample, I’m afraid I cannot test it.
>>
>> Just in case it might help,
>>
>> Pablo
>>
> most math setups have an (unset) mathextra featureset that you can use for
> such extra features and indeed one should not inherit from defult
>
>   \definefontfeature[mathdigits][tnum=yes,lnum=yes]
>
> of course it also depends on what a font provides (if we're talking
> alternates one can also use the normal 'alternates' feature switching in
> math)
>
> Hans
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 3621 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Opentype features and space after comma in math mode
  2017-06-03  7:58                 ` Jose Luis Arellano
@ 2017-06-03  9:27                   ` Pablo Rodriguez
  0 siblings, 0 replies; 11+ messages in thread
From: Pablo Rodriguez @ 2017-06-03  9:27 UTC (permalink / raw)
  To: ntg-context

On 06/03/2017 09:58 AM, Jose Luis Arellano wrote:
> Thanks guys, but unfortunately the code provided doesn't works.
> 
> \definefontfeature[mathdigits][mode=base,tnum=yes,lnum=yes]
> \definefontfeature[mathdigits][tnum=yes,lnum=yes]

José Luis,

could you provide a minimal complete sample that shows the issue?

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 11+ messages in thread

end of thread, other threads:[~2017-06-03  9:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 18:20 Opentype features and space after comma in math mode Jose Luis Arellano
2016-08-29 20:45 ` Jose Luis Arellano
2016-08-29 21:02   ` Wolfgang Schuster
2016-08-29 21:22     ` Jose Luis Arellano
2016-08-29 21:43       ` Wolfgang Schuster
2016-08-29 22:31         ` Jose Luis Arellano
2017-06-02  4:40           ` Jose Luis Arellano
2017-06-02  5:40             ` Pablo Rodriguez
2017-06-02  7:47               ` Hans Hagen
2017-06-03  7:58                 ` Jose Luis Arellano
2017-06-03  9:27                   ` Pablo Rodriguez

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