Missing math font breaks compilation
Hi, typefaces with a missing font for math produce an error when it’s applied after \starttext which is common when the project structure is used where environment files are loaded after \startproduct or \startcomponent. Minimal example: \starttext \definetypeface[test][rm][serif][pagella] [default] %\definetypeface[test][mm][math] [palatino][default] \setupbodyfont[test] \input knuth \stoptext Wolfgang
On 20-5-2012 22:26, Wolfgang Schuster wrote:
Hi,
typefaces with a missing font for math produce an error when it’s applied after \starttext which is common when the project structure is used where environment files are loaded after \startproduct or \startcomponent.
Minimal example:
\starttext
\definetypeface[test][rm][serif][pagella] [default] %\definetypeface[test][mm][math] [palatino][default]
\setupbodyfont[test]
\input knuth
\stoptext
After playing a bit with possible ways out of this, I decided to stick to \def\font_helpers_preset_math_family_indeed#fam#familytag% {\expandafter\ifx\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname\relax \writestatus{fonts}{math: unset for global bodyfont \fontclass\space at \fontbody}% \else \scriptscriptfont#fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-3\endcsname \scriptfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-2\endcsname \textfont #fam\csname\??fontinstanceclass\fontclass-\fontbody-\s!mm-#familytag-\fontsize-1\endcsname \fi} After all, it's an error not to define math for a 'global' bodyfont. 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Wolfgang Schuster