ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \pm set too low in MkIV?
@ 2014-05-06 14:22 Sanjoy Mahajan
  2014-05-06 14:41 ` Mikael P. Sundqvist
  2014-05-06 18:14 ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Sanjoy Mahajan @ 2014-05-06 14:22 UTC (permalink / raw)
  To: ntg-context

Continuing my recent theme of finding glyphs too low or too high:

The \pm symbol looks like it is set too low, in MkIV.

\setuppagenumbering[location=]
\starttext
$\pm2$
\stoptext

The minus part of the sign lies below the baseline, which looks odd
relative to the horizontal stroke of the "2."

In MkII it is fine, as is the equivalent latex or plain tex (using
LatinModern).

I don't know whether the problem lis in the font metrics or in the
positioning by MkIV, because I haven't yet been able to convince tex,
latex, lualatex, or luatex to use the same font (LM math).

In MkIV, the font is  (from pdffonts):

  NSOXNN+LatinModernMath-Regular       CID Type 0C       Identity-H

Can anyone confirm the problem?

-Sanjoy
___________________________________________________________________________________
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] 10+ messages in thread

* Re: \pm set too low in MkIV?
  2014-05-06 14:22 \pm set too low in MkIV? Sanjoy Mahajan
@ 2014-05-06 14:41 ` Mikael P. Sundqvist
  2014-05-06 14:56   ` Sanjoy Mahajan
  2014-05-06 18:14 ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Mikael P. Sundqvist @ 2014-05-06 14:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, May 6, 2014 at 4:22 PM, Sanjoy Mahajan <sanjoy@mit.edu> wrote:
> Continuing my recent theme of finding glyphs too low or too high:
>
> The \pm symbol looks like it is set too low, in MkIV.
>
> \setuppagenumbering[location=]
> \starttext
> $\pm2$
> \stoptext
>
> The minus part of the sign lies below the baseline, which looks odd
> relative to the horizontal stroke of the "2."
>
> In MkII it is fine, as is the equivalent latex or plain tex (using
> LatinModern).
>
> I don't know whether the problem lis in the font metrics or in the
> positioning by MkIV, because I haven't yet been able to convince tex,
> latex, lualatex, or luatex to use the same font (LM math).
>
> In MkIV, the font is  (from pdffonts):
>
>   NSOXNN+LatinModernMath-Regular       CID Type 0C       Identity-H
>
> Can anyone confirm the problem?
>
> -Sanjoy
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

I can confirm that it is too low in latest standalone. It looks OK at
http://live.contextgarden.net/, though.

I can also add that \surd is way too low in latest standalone (and
only a bit to low in mkiv on http://live.contextgarden.net/, and OK in
mkii on http://live.contextgarden.net/).

\setuppagenumbering[location=]
\starttext
$\pm2$ and $\surd(1+2)$.
\stoptext

/Mikael
___________________________________________________________________________________
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] 10+ messages in thread

* Re: \pm set too low in MkIV?
  2014-05-06 14:41 ` Mikael P. Sundqvist
@ 2014-05-06 14:56   ` Sanjoy Mahajan
  2014-05-06 19:09     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Sanjoy Mahajan @ 2014-05-06 14:56 UTC (permalink / raw)
  To: Mikael P. Sundqvist, mailing list for ConTeXt users

Thanks for the testing.  I just tried it too. The live context uses MkIV
2012.05.30.  It also gets a different set of fonts:

VNVCGN+LMMathSymbols10-Regular       Type 1            Custom      
LFHPBE+LMRoman12-Regular             CID Type 0C       Identity-H  

I still wonder whether the placement is due to the new LM Math font.

-Sanjoy

"Mikael P. Sundqvist" <mickep@gmail.com> writes:

> I can confirm that it is too low in latest standalone. It looks OK at
> http://live.contextgarden.net/, though.
>
> I can also add that \surd is way too low in latest standalone (and
> only a bit to low in mkiv on http://live.contextgarden.net/, and OK in
> mkii on http://live.contextgarden.net/).
>
> \setuppagenumbering[location=]
> \starttext
> $\pm2$ and $\surd(1+2)$.
> \stoptext
>
> /Mikael
___________________________________________________________________________________
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] 10+ messages in thread

* Re: \pm set too low in MkIV?
  2014-05-06 14:22 \pm set too low in MkIV? Sanjoy Mahajan
  2014-05-06 14:41 ` Mikael P. Sundqvist
@ 2014-05-06 18:14 ` Hans Hagen
  2014-05-06 18:28   ` Otared Kavian
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2014-05-06 18:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/6/2014 4:22 PM, Sanjoy Mahajan wrote:
> Continuing my recent theme of finding glyphs too low or too high:
>
> The \pm symbol looks like it is set too low, in MkIV.
>
> \setuppagenumbering[location=]
> \starttext
> $\pm2$
> \stoptext
>
> The minus part of the sign lies below the baseline, which looks odd
> relative to the horizontal stroke of the "2."
>
> In MkII it is fine, as is the equivalent latex or plain tex (using
> LatinModern).
>
> I don't know whether the problem lis in the font metrics or in the
> positioning by MkIV, because I haven't yet been able to convince tex,
> latex, lualatex, or luatex to use the same font (LM math).
>
> In MkIV, the font is  (from pdffonts):
>
>    NSOXNN+LatinModernMath-Regular       CID Type 0C       Identity-H
>
> Can anyone confirm the problem?

\starttext
                                $x \pm 2 + a $\par
     \switchtobodyfont[pagella] $x \pm 2 + a $\par
     \switchtobodyfont[termes]  $x \pm 2 + a $\par
     \switchtobodyfont[cambria] $x \pm 2 + a $\par
     \switchtobodyfont[bonum]   $x \pm 2 + a $\par
     \switchtobodyfont[schola]  $x \pm 2 + a $\par
\stoptext

all minus' are below the baseline so consider it a feature

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \pm set too low in MkIV?
  2014-05-06 18:14 ` Hans Hagen
@ 2014-05-06 18:28   ` Otared Kavian
  2014-05-06 19:08     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Otared Kavian @ 2014-05-06 18:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Hans,

Thanks for your attention to the issue pointed out by Sanjoy.

On 6 mai 2014, at 20:14, Hans Hagen <pragma@wxs.nl> wrote:
> […]
> all minus' are below the baseline so consider it a feature

Yes this is the case in recent versions of mkiv, but in Plain TeX and mkii this is not the case: there the minus sign in \pm is aligned with the baseline.

I agree with Sanjoy and Mikael to say that it the minus sign in \pm should be aligned with the baseline: however I don’t know if this can be easily achieved.

Best regards: OK

> 
> Hans
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>    tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 2864 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] 10+ messages in thread

* Re: \pm set too low in MkIV?
  2014-05-06 18:28   ` Otared Kavian
@ 2014-05-06 19:08     ` Hans Hagen
  2014-05-07  0:34       ` Sanjoy Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2014-05-06 19:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/6/2014 8:28 PM, Otared Kavian wrote:
> Hi Hans,
>
> Thanks for your attention to the issue pointed out by Sanjoy.
>
> On 6 mai 2014, at 20:14, Hans Hagen <pragma@wxs.nl
> <mailto:pragma@wxs.nl>> wrote:
>> […]
>> all minus' are below the baseline so consider it a feature
>
> Yes this is the case in recent versions of mkiv, but in Plain TeX and
> mkii this is not the case: there the minus sign in \pm is aligned with
> the baseline.
>
> I agree with Sanjoy and Mikael to say that it the minus sign in \pm
> should be aligned with the baseline: however I don’t know if this can be
> easily achieved.

so how about \mp then ...

\starttext
                                $x \pm 2 + \mp x + a $\par
     \switchtobodyfont[pagella] $x \pm 2 + \mp x + a $\par
     \switchtobodyfont[termes]  $x \pm 2 + \mp x + a $\par
     \switchtobodyfont[cambria] $x \pm 2 + \mp x + a $\par
     \switchtobodyfont[bonum]   $x \pm 2 + \mp x + a $\par
     \switchtobodyfont[schola]  $x \pm 2 + \mp x + a $\par
\stoptext

the + aligns on the math axis so one can argue if the type-one variant 
is ok ... so we would need a smaller (less height) + then which would 
look visually weird

(all can be achieved ... but the idea of lm/gyre fonts is to provide an 
acceptable consistent set ... at some point we can think of variants - 
or maybe the fonts have a variant already)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \pm set too low in MkIV?
  2014-05-06 14:56   ` Sanjoy Mahajan
@ 2014-05-06 19:09     ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2014-05-06 19:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mikael P. Sundqvist

On 5/6/2014 4:56 PM, Sanjoy Mahajan wrote:
> Thanks for the testing.  I just tried it too. The live context uses MkIV
> 2012.05.30.  It also gets a different set of fonts:
>
> VNVCGN+LMMathSymbols10-Regular       Type 1            Custom
> LFHPBE+LMRoman12-Regular             CID Type 0C       Identity-H

that's then the virtual lm unicode math (which you can still use in the 
latest mkiv if needed)

> I still wonder whether the placement is due to the new LM Math font.

yes

> -Sanjoy
>
> "Mikael P. Sundqvist" <mickep@gmail.com> writes:
>
>> I can confirm that it is too low in latest standalone. It looks OK at
>> http://live.contextgarden.net/, though.
>>
>> I can also add that \surd is way too low in latest standalone (and
>> only a bit to low in mkiv on http://live.contextgarden.net/, and OK in
>> mkii on http://live.contextgarden.net/).
>>
>> \setuppagenumbering[location=]
>> \starttext
>> $\pm2$ and $\surd(1+2)$.
>> \stoptext
>>
>> /Mikael
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \pm set too low in MkIV?
  2014-05-06 19:08     ` Hans Hagen
@ 2014-05-07  0:34       ` Sanjoy Mahajan
  2014-05-07  8:46         ` Mikael P. Sundqvist
  0 siblings, 1 reply; 10+ messages in thread
From: Sanjoy Mahajan @ 2014-05-07  0:34 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

> the + aligns on the math axis so one can argue if the type-one variant 
> is ok ... so we would need a smaller (less height) + then which would 
> look visually weird

Plain TeX doesn't align the plus/minus to the math axis.  Rather, the
minus is aligned to the baseline, and the horizontal stroke of the plus
is above the baseline.  I agree that it looks a bit strange with the
horizontal stroke of the plus sign not aligned with the horizontal
stroke of the plus/minus.  Bt it looks even more jarring to have the
minus below the baseline, because the baseline is such a strong visual
line.

I don't think I've ever the minus below the baseline in a math book, and
it looks very wrong to my eye.

Pagella looks worse than the others, because it has a vertical gap
between the minus and the plus sign, so the depth below the baseline is
even larger.

> (all can be achieved ... but the idea of lm/gyre fonts is to provide an 
> acceptable consistent set ... at some point we can think of variants - 
> or maybe the fonts have a variant already)

I realize that it's not a ConTeXt problem, but is there a ConTeXt
workaround?  Or better to go to the TeX guts and compute the depth of
the box, then use \raise{}?

-Sanjoy
___________________________________________________________________________________
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] 10+ messages in thread

* Re: \pm set too low in MkIV?
  2014-05-07  0:34       ` Sanjoy Mahajan
@ 2014-05-07  8:46         ` Mikael P. Sundqvist
  2014-05-07  9:38           ` Otared Kavian
  0 siblings, 1 reply; 10+ messages in thread
From: Mikael P. Sundqvist @ 2014-05-07  8:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 7, 2014 at 2:34 AM, Sanjoy Mahajan <sanjoy@mit.edu> wrote:
>> the + aligns on the math axis so one can argue if the type-one variant
>> is ok ... so we would need a smaller (less height) + then which would
>> look visually weird
>
> Plain TeX doesn't align the plus/minus to the math axis.  Rather, the
> minus is aligned to the baseline, and the horizontal stroke of the plus
> is above the baseline.  I agree that it looks a bit strange with the
> horizontal stroke of the plus sign not aligned with the horizontal
> stroke of the plus/minus.  Bt it looks even more jarring to have the
> minus below the baseline, because the baseline is such a strong visual
> line.
>
> I don't think I've ever the minus below the baseline in a math book, and
> it looks very wrong to my eye.
>
> Pagella looks worse than the others, because it has a vertical gap
> between the minus and the plus sign, so the depth below the baseline is
> even larger.
>
>> (all can be achieved ... but the idea of lm/gyre fonts is to provide an
>> acceptable consistent set ... at some point we can think of variants -
>> or maybe the fonts have a variant already)
>
> I realize that it's not a ConTeXt problem, but is there a ConTeXt
> workaround?  Or better to go to the TeX guts and compute the depth of
> the box, then use \raise{}?
>
> -Sanjoy
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

Sanjoy,

the following borrows the \pm sign from Asana (which also should be
like palatino), which looks more "normal".

% Start example
\definefallbackfamily[mainface][math][Asana Math]
[range={00B1-00B1}]

\definefontfamily[mainface][serif][Tex Gyre Pagella]
\definefontfamily[mainface][math][Tex Gyre Pagella Math]


\starttext
    \switchtobodyfont[pagella] Hello $\int x \pm 2 + a $\par
    \switchtobodyfont[asana] Hello  $\int x \pm 2 + a $\par
    \switchtobodyfont[mainface] Hello  $\int x \pm 2 + a $\par
\stoptext
% Stop example

I guess one could do this for the other signs one don't like in TeX
Gyre Pagella Math...

/Mikael
___________________________________________________________________________________
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] 10+ messages in thread

* Re: \pm set too low in MkIV?
  2014-05-07  8:46         ` Mikael P. Sundqvist
@ 2014-05-07  9:38           ` Otared Kavian
  0 siblings, 0 replies; 10+ messages in thread
From: Otared Kavian @ 2014-05-07  9:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 7 mai 2014, at 10:46, Mikael P. Sundqvist <mickep@gmail.com> wrote:

> […]
> 
> I guess one could do this for the other signs one don't like in TeX
> Gyre Pagella Math…

Hi,

This is a good trick to know, especially if one combines \pm and \mp as in the counter-example given by Hans: 

% Start example
\definefallbackfamily[mainface][math][Asana Math]
[range={00B1-00B1}]

\definefontfamily[mainface][serif][Tex Gyre Pagella]
\definefontfamily[mainface][math][Tex Gyre Pagella Math]

\starttext
   \switchtobodyfont[pagella] Hello $ x \pm 2 = a \mp 2 $\par
   \switchtobodyfont[asana] Hello  $ x \pm 2 = a \mp 2 $\par
   \switchtobodyfont[mainface] Hello  $ x \pm 2 = a \mp 2 $\par
\stoptext
% Stop example

The sample with 
	   \switchtobodyfont[asana] Hello  $ x \pm 2 = a \mp 2 $\par
looks quite fine.

Best regards: OK
___________________________________________________________________________________
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] 10+ messages in thread

end of thread, other threads:[~2014-05-07  9:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06 14:22 \pm set too low in MkIV? Sanjoy Mahajan
2014-05-06 14:41 ` Mikael P. Sundqvist
2014-05-06 14:56   ` Sanjoy Mahajan
2014-05-06 19:09     ` Hans Hagen
2014-05-06 18:14 ` Hans Hagen
2014-05-06 18:28   ` Otared Kavian
2014-05-06 19:08     ` Hans Hagen
2014-05-07  0:34       ` Sanjoy Mahajan
2014-05-07  8:46         ` Mikael P. Sundqvist
2014-05-07  9:38           ` Otared Kavian

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