Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Hans Hagen

On 16-12-2011 06:25, Wolfgang Schuster wrote:


Wait for Hans to fix it and use in the meantime


Bold math os somewhat special as we have two variants:

1: a full bold bold math alternartive (only a few math fonts)
2: pseudoboldmath (where we take bold variants in a regular math font)

If you say:

\setfalse\completeboldmathstrategy

at the top of your file then only method (2) is used which is probabkly 
ok for the purpose. This method is actually provides in order to have a 
reasonable bolding in titles even if the font does not provide it. Of 
course bidirectional math adds another axis.


(It reminds me that I need to wrap this up in an article.)

The reason why the double loading fails is that the underlying machinery 
sees a difference between regular (pagella) and bold (still modern) and 
therefore decides that (1) can be applied. I'll try to make this 
heuristic more clever. Another solution (for WS eyes only: add 
\definefontsynonym[MathRomanBold][MathRoman] to the palatino mah 
definition).


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
___


Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Hans Hagen

On 16-12-2011 06:25, Wolfgang Schuster wrote:


Wait for Hans to fix it and use in the meantime


ok. fixed. I also added some tracing so that one can see how bold is 
treated (although that bit of code itself was ok):


\enabletrackers[math.families]

i'll upload a beta later today

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
___


Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Philipp A.
thanks for the effort. i can’t say i understand anything about fonts if i
judge from what the results of above suggestions look like:

\usemodule[simplefonts]

\definesimplefonttypeface[mainface][Cambria]
\definesimplefonttypeface[mainface][Ubuntu] [style=sans]
\definesimplefonttypeface[mainface][cambria][style=math]

\setupbodyfont[mainface]

Well: header math is in unbold cambria, body text in courier or something
like this, and the math font features are not used (tiny parentheses around
matrices, fraction denominators and numerators are shrunk instead of using
small glyphs)

\setfalse\completeboldmathstrategy

\usemodule[simplefonts]
\setmainfont[Cambria]
\setmathfont[Cambria]
\setsansfont[Ubuntu]

too slim parentheses, but this is to be expected :D

\definetypeface[mainface][rm][specserif][Cambria]
\definetypeface[mainface][ss][specsans] [Ubuntu]
\definetypeface[mainface][mm][math] [cambria]

\setupbodyfont[mainface]

exactly the same as above. slim parentheses in header math, rest working.
cambria in the last line only works when lowercase, but is case-insensitive
in the rm and ss lines. does this solution disable the
completeboldmathstrategy automatically?

thanks for the fixes,
philipp
___
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
___

Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Hans Hagen

On 16-12-2011 11:41, Philipp A. wrote:

thanks for the effort. i can’t say i understand anything about fonts if i
judge from what the results of above suggestions look like:

 \usemodule[simplefonts]

 \definesimplefonttypeface[mainface][Cambria]
 \definesimplefonttypeface[mainface][Ubuntu] [style=sans]
 \definesimplefonttypeface[mainface][cambria][style=math]

 \setupbodyfont[mainface]

Well: header math is in unbold cambria, body text in courier or something
like this, and the math font features are not used (tiny parentheses around
matrices, fraction denominators and numerators are shrunk instead of using
small glyphs)

 \setfalse\completeboldmathstrategy

 \usemodule[simplefonts]
 \setmainfont[Cambria]
 \setmathfont[Cambria]
 \setsansfont[Ubuntu]

too slim parentheses, but this is to be expected :D

 \definetypeface[mainface][rm][specserif][Cambria]
 \definetypeface[mainface][ss][specsans] [Ubuntu]
 \definetypeface[mainface][mm][math] [cambria]

 \setupbodyfont[mainface]

exactly the same as above. slim parentheses in header math, rest working.
cambria in the last line only works when lowercase, but is case-insensitive
in the rm and ss lines. does this solution disable the
completeboldmathstrategy automatically?


I dunno ... Wolfgang knows the logic behind simplefonts best

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
___

Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Wolfgang Schuster

Am 16.12.2011 um 11:41 schrieb Philipp A.:

 thanks for the effort. i can’t say i understand anything about fonts if i 
 judge from what the results of above suggestions look like:
 
 \usemodule[simplefonts]

 \definesimplefonttypeface[mainface][Cambria]
 \definesimplefonttypeface[mainface][Ubuntu] [style=sans]
 \definesimplefonttypeface[mainface][cambria][style=math]

 \setupbodyfont[mainface]
 
 Well: header math is in unbold cambria, body text in courier or something 
 like this, and the math font features are not used (tiny parentheses around 
 matrices, fraction denominators and numerators are shrunk instead of using 
 small glyphs)
 
 \setfalse\completeboldmathstrategy
 
 \usemodule[simplefonts]
 \setmainfont[Cambria]
 \setmathfont[Cambria]
 \setsansfont[Ubuntu] 

I’ll upload a new version of the module.

 too slim parentheses, but this is to be expected :D
 
 \definetypeface[mainface][rm][specserif][Cambria]
 \definetypeface[mainface][ss][specsans] [Ubuntu]
 \definetypeface[mainface][mm][math] [cambria]

 \setupbodyfont[mainface]
 
 exactly the same as above. slim parentheses in header math, rest working. 
 cambria in the last line only works when lowercase, but is case-insensitive 
 in the rm and ss lines. does this solution disable the 
 completeboldmathstrategy automatically?

Typescripts and typefaces are case sensitive and 
\definetypeface[…][…][math][cambria] is not the same as 
\definetypeface[…][…][math][Cambria].

Wolfgang
___
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
___


Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Wolfgang Schuster

Am 16.12.2011 um 11:58 schrieb Hans Hagen:

 On 16-12-2011 11:41, Philipp A. wrote:
 \definetypeface[mainface][rm][specserif][Cambria]
 \definetypeface[mainface][ss][specsans] [Ubuntu]
 \definetypeface[mainface][mm][math] [cambria]
 
 \setupbodyfont[mainface]
 
 exactly the same as above. slim parentheses in header math, rest working.
 cambria in the last line only works when lowercase, but is case-insensitive
 in the rm and ss lines. does this solution disable the
 completeboldmathstrategy automatically?
 
 I dunno ... Wolfgang knows the logic behind simplefonts best

This method is a core function and unrelated to simplefonts.

Wolfgang
___
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
___


Re: [NTG-context] simplefonts: math in headers

2011-12-16 Thread Hans Hagen

On 16-12-2011 14:18, Wolfgang Schuster wrote:


Am 16.12.2011 um 11:58 schrieb Hans Hagen:


On 16-12-2011 11:41, Philipp A. wrote:

 \definetypeface[mainface][rm][specserif][Cambria]
 \definetypeface[mainface][ss][specsans] [Ubuntu]
 \definetypeface[mainface][mm][math] [cambria]

 \setupbodyfont[mainface]

exactly the same as above. slim parentheses in header math, rest working.
cambria in the last line only works when lowercase, but is case-insensitive
in the rm and ss lines. does this solution disable the
completeboldmathstrategy automatically?


I dunno ... Wolfgang knows the logic behind simplefonts best


This method is a core function and unrelated to simplefonts.


It is somewhat .. say that you redefine a typeface in simplefonts and 
use a fontclass name that has already been used, in that case some 
caching starts interfering. I now reset a couple of things before a new 
typeface is defined.


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
___


Re: [NTG-context] simplefonts: math in headers

2011-12-15 Thread Philipp A.
Bump:

2011/12/9 Philipp A. flying-sh...@web.de

 hi, i have the following setup:

 \usemodule[simplefonts]
 \setmainfont[Cambria]
 \setsansfont[Ubuntu]
 \setmonofont[Envy Code R][regularfont=envycoder]
 \setmathfont[Cambria]

 \setuphead[section][style={\ss\bfb}]

 \starttext
 \section{Wat? $y=x^2$}
 \stoptext

 why is the math in the header typeset in computer modern instead of ubuntu
 and how do i fix it?

 PS: preferrably it should be bold, too. there is a wiki page, “Bold Math
 in Section Titleshttp://wiki.contextgarden.net/Bold_Math_in_Section_Titles”
 but it doesn’t explain how to do it with simplefonts.

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

Re: [NTG-context] simplefonts: math in headers

2011-12-15 Thread Wolfgang Schuster

Am 15.12.2011 um 14:36 schrieb Philipp A.:

 Bump:
 
 2011/12/9 Philipp A. flying-sh...@web.de
 hi, i have the following setup:
 
 \usemodule[simplefonts]
 \setmainfont[Cambria]
 \setsansfont[Ubuntu]
 \setmonofont[Envy Code R][regularfont=envycoder]
 \setmathfont[Cambria]
 
 \setuphead[section][style={\ss\bfb}]
 
 \starttext
 \section{Wat? $y=x^2$}
 \stoptext
 
 why is the math in the header typeset in computer modern instead of ubuntu 
 and how do i fix it?
 
 PS: preferrably it should be bold, too. there is a wiki page, “Bold Math in 
 Section Titles” but it doesn’t explain how to do it with simplefonts.

There is no way for me to fix this because it’s a context bug.  You can see the 
effect with the following example, when you load LM before Pagella the heading 
use LM Math but when you load Pagella before LM Palatino math is used for the 
heading.

\setupbodyfont[modern]
\setupbodyfont[pagella]

\setuphead[section][style={\ss\bfb}]

\starttext
\section{Wat? $y=x^2$} $y=x^2$
\stoptext

Wolfgang___
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
___

Re: [NTG-context] simplefonts: math in headers

2011-12-15 Thread Philipp A.
2011/12/15 Wolfgang Schuster schuster.wolfg...@googlemail.com

 There is no way for me to fix this because it’s a context bug.  You can
 see the effect with the following example, when you load LM before Pagella
 the heading use LM Math but when you load Pagella before LM Palatino math
 is used for the heading.

 \setupbodyfont[modern]
 \setupbodyfont[pagella]

 \setuphead[section][style={\ss\bfb}]

 \starttext
 \section{Wat? $y=x^2$} $y=x^2$
 \stoptext

 Wolfgang



umm, so this happens because this bug exists and simplefonts sets the fonts
on module load?

is there a way to fix it or is an official fix on the way?

thanks for the info,
philipp
___
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
___

Re: [NTG-context] simplefonts: math in headers

2011-12-15 Thread Wolfgang Schuster

Am 16.12.2011 um 00:13 schrieb Philipp A.:

 2011/12/15 Wolfgang Schuster schuster.wolfg...@googlemail.com
 There is no way for me to fix this because it’s a context bug.  You can see 
 the effect with the following example, when you load LM before Pagella the 
 heading use LM Math but when you load Pagella before LM Palatino math is used 
 for the heading.
 
 \setupbodyfont[modern]
 \setupbodyfont[pagella]
 
 \setuphead[section][style={\ss\bfb}]
 
 \starttext
 \section{Wat? $y=x^2$} $y=x^2$
 \stoptext
 
 Wolfgang
 
 
 umm, so this happens because this bug exists and simplefonts sets the fonts 
 on module load?

Yes.

 is there a way to fix it or is an official fix on the way?


Wait for Hans to fix it and use in the meantime

\usemodule[simplefonts]

\definesimplefonttypeface[mainface][Cambria]
\definesimplefonttypeface[mainface][Ubuntu] [style=sans]
\definesimplefonttypeface[mainface][cambria][style=math]

\setupbodyfont[mainface]

\setuphead[section][style={\ss\bfb}]

\starttext
\section{Wat? $y=x^2$} $y=x^2$
\stoptext

or

\definetypeface[mainface][rm][specserif][Cambria]
\definetypeface[mainface][ss][specsans] [Ubuntu]
\definetypeface[mainface][mm][math] [cambria]

\setupbodyfont[mainface]

\setuphead[section][style={\ss\bfb}]

\starttext
\section{Wat? $y=x^2$} $y=x^2$
\stoptext

Wolfgang___
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
___