ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* numerator is too high in \frac{3}{4}, in palatino
@ 2014-05-02  2:46 Sanjoy Mahajan
  2014-05-05 10:35 ` Sanjoy Mahajan
  2014-05-06 12:37 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Sanjoy Mahajan @ 2014-05-02  2:46 UTC (permalink / raw)
  To: ntg-context

I've noticed the following issue with how high the numerator is placed,
but only when using Palatino:

\setupbodyfont[palatino]
\starttext
\startformula
{3\over4}\quad {1\over2}
\stopformula
\stoptext

The 3 and the 1 sit quite high above the division line, esp. in
comparison with the gap below the line (above the 4 and the 2).

The place okay without the \setupbodyfont[palatino], so maybe it is
something incorrect in the font parameters?

The fonts are (from 'pdffonts'):

EUEJAR+TeXGyrePagella-Regular        CID Type 0C       Identity-H       yes yes yes     18  0
UPBTGS+TeXGyrePagellaMath-Regular    CID Type 0C       Identity-H       yes yes yes     19  0

And it is compiled with 2014.03.27 20:04 MKIV.

Is there a way to adjust the spacing, or an alternative workaround?

-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] 4+ messages in thread

* Re: numerator is too high in \frac{3}{4}, in palatino
  2014-05-02  2:46 numerator is too high in \frac{3}{4}, in palatino Sanjoy Mahajan
@ 2014-05-05 10:35 ` Sanjoy Mahajan
  2014-05-06 12:37 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Sanjoy Mahajan @ 2014-05-05 10:35 UTC (permalink / raw)
  To: ntg-context

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

I just compared MkII and MkIV in this respect, and the MkII fraction
looks more symmetric (more correct) than the MkIV version.

Here is the MkII code:

\usetypescript[palatino][ec]
\setupbodyfont[palatino]
\starttext
\startformula
{3\over4}\quad {1\over2}
\stopformula
\stoptext

I've attached  (cropped) images to show the difference.

Another difference is in the fonts.  For the MkII version, pdffonts gives

  IVJLXF+TeXGyrePagella-Regular        Type 1            Custom           yes yes no       4  0
  IVJLXF+TeXGyrePagella-Regular        Type 1            Custom           yes yes no       5  0


For the MkIV version, pdffonts shows a math font (maybe for the
thicker fractional bar):

  EUEJAR+TeXGyrePagella-Regular        CID Type 0C       Identity-H       yes yes yes     18  0
  UPBTGS+TeXGyrePagellaMath-Regular    CID Type 0C       Identity-H       yes yes yes     19  0


If you have suggestions for how to change, slightly, the numerator and
denominator placement when using alatino, let me know.

Maybe the entire problem is that the division line is thicker in
Palatino math than in the text font, and maybe sits below the math axis
(so it gets too close to the denominator)?

-Sanjoy


[-- Attachment #2: MkII version --]
[-- Type: image/png, Size: 1559 bytes --]

[-- Attachment #3: MkIV version --]
[-- Type: image/png, Size: 1562 bytes --]

[-- Attachment #4: 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] 4+ messages in thread

* Re: numerator is too high in \frac{3}{4}, in palatino
  2014-05-02  2:46 numerator is too high in \frac{3}{4}, in palatino Sanjoy Mahajan
  2014-05-05 10:35 ` Sanjoy Mahajan
@ 2014-05-06 12:37 ` Hans Hagen
  2014-05-18  1:19   ` Sanjoy Mahajan
  1 sibling, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2014-05-06 12:37 UTC (permalink / raw)
  To: ntg-context

On 5/2/2014 4:46 AM, Sanjoy Mahajan wrote:
> I've noticed the following issue with how high the numerator is placed,
> but only when using Palatino:
>
> \setupbodyfont[palatino]
> \starttext
> \startformula
> {3\over4}\quad {1\over2}
> \stopformula
> \stoptext
>
> The 3 and the 1 sit quite high above the division line, esp. in
> comparison with the gap below the line (above the 4 and the 2).
>
> The place okay without the \setupbodyfont[palatino], so maybe it is
> something incorrect in the font parameters?
>
> The fonts are (from 'pdffonts'):
>
> EUEJAR+TeXGyrePagella-Regular        CID Type 0C       Identity-H       yes yes yes     18  0
> UPBTGS+TeXGyrePagellaMath-Regular    CID Type 0C       Identity-H       yes yes yes     19  0
>
> And it is compiled with 2014.03.27 20:04 MKIV.

these are font properties and using a consistent opentype math versus a 
bunch of loosely related type one fonts makes a difference

keep in mind that a too small distance can give inconsistent output

> Is there a way to adjust the spacing, or an alternative workaround?

I've added:

\starttext

     $\displaystyle 1+{2g\over3}+{2\over3}$ \blank

     \setupmathfractions[topdistance=0pt]

     $\displaystyle 1+{2g\over3}+{2\over3}$ \blank

     \setupmathfractions[bottomdistance=0pt]

     $\displaystyle 1+{2g\over3}+{2\over3}$ \blank

     \setupmathfractions[topdistance=0pt,bottomdistance=0pt]

     $\displaystyle 1+{2g\over3}+{2\over3}$ \blank

\stoptext




-----------------------------------------------------------------
                                           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] 4+ messages in thread

* Re: numerator is too high in \frac{3}{4}, in palatino
  2014-05-06 12:37 ` Hans Hagen
@ 2014-05-18  1:19   ` Sanjoy Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Sanjoy Mahajan @ 2014-05-18  1:19 UTC (permalink / raw)
  To: Hans Hagen, ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> these are font properties and using a consistent opentype math versus
> a bunch of loosely related type one fonts makes a difference

But shouldn't TeXGyrePagellaMath qualify?

> I've added:
>
> \starttext
>
>      $\displaystyle 1+{2g\over3}+{2\over3}$ \blank
>
>      \setupmathfractions[topdistance=0pt]
>
>      $\displaystyle 1+{2g\over3}+{2\over3}$ \blank
>
>      \setupmathfractions[bottomdistance=0pt]
>
>      $\displaystyle 1+{2g\over3}+{2\over3}$ \blank
>
>      \setupmathfractions[topdistance=0pt,bottomdistance=0pt]
>
>      $\displaystyle 1+{2g\over3}+{2\over3}$ \blank
>
> \stoptext

Thanks, Hans.  That is very useful.  

I also recompiled my textbook draft using the latest beta (2014.05.17),
and it works very well.  I tried the topdistance and bottomdistance and
they are mostly working.  To my eye, with topdistance=6pt, the {1\over2}
looks very good again.

However, the settings don't seem to affect fractions inside square
roots.  Here's an example (the 20pt setting is to exaggerate the
possible effect), using 2014.05.17 beta.

\starttext
\placeformula\startformula
\dfrac{ag}{bcd}\quad{ag\over bcd}
\stopformula
\placeformula\startformula
\sqrt{1\over \dfrac{a}{bcd}}
\quad
\sqrt{\dfrac{1}{\dfrac{a}{bcd}}}
\stopformula

\setupmathfractions [topdistance=20pt]

\placeformula\startformula
\dfrac{ag}{bcd}\quad{ag\over bcd}
\stopformula
\placeformula\startformula
\sqrt{1\over \dfrac{a}{bcd}}
\quad
\sqrt{\dfrac{1}{\dfrac{a}{bcd}}}
\stopformula

\stoptext
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2014-05-18  1:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-02  2:46 numerator is too high in \frac{3}{4}, in palatino Sanjoy Mahajan
2014-05-05 10:35 ` Sanjoy Mahajan
2014-05-06 12:37 ` Hans Hagen
2014-05-18  1:19   ` Sanjoy Mahajan

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