4

Yesterday Aditya very helpfully updated the Wiki: http://wiki.contextgarden.net/Math_fonts#Using_Math_fonts_in_MkIV.

Modern, times, palatino, bonus, iwona (not iowna), antykwa-torunska, lucidanova, xits, xitsbidi and cambria appear to work properly under MKIV current, and 2013.11.10 12:23 MKIV beta.

Lucida and asana work under current but not under beta. However, lucida does not create all symbols. For example, the \nabla symbol is not created. (This problem does not occur with lucidanova).

Hvmath, informal and mathtimes would not build under either beta or current.

Charter, garamond and utopia would not build under beta and defaulted to modern under current.

Euler defaulted to modern under both current and beta.

Do others find the same issues with math fonts?

When, for example, lucida builds under current it uses fonts in /usr/local/texlive/texmf-local/fonts. I have copied the contents of the /texlive/texmf-local into the /texmf-local folder of my standalone beta version. I have used sudo texhash and the ls-R file has built and appears to list the contents properly. However, there is no sign that beta recognises the contents of the texmf-local folder.

Why should current recognise/use its texmf-local folder but beta not recognise/use its texmf-local?

I have been looking at some of the typescript files. The basic structure is recognisable from the documentation. However, most of the entries are preceded by ‘\s!’. What does this mean?

I am sure I am not the only person to find math fonts in ConTeXt difficult. Any assistance would be much appreciated.

5

Here is a complete example on how to use Euler.

  1. Download Euler OTF from Github
  2. Move the font somewhere in your $TEXMF/fonts/opentype tree. To see the list of folders that ConTeXt searches, run:

    mtxrun --expand-var=TEXMF
    

    or

    mtxrun --expand-var=TEXMFHOME
    
  3. Update the font database by running

    mtxrun --script font --reload --force
    
  4. Check that ConTeXt can find the fonts:

    mtxrun --script fonts  --list --pattern=euler --all
    

    (you should see euler.otf in the list).

  5. Compile the following example file (this needs ConTeXt version from October, 2013 or later).

    \usetypescriptfile[euler]
    
    \definetypeface[mainface][rm][serif][palatino]         [default]
    \definetypeface[mainface][ss][sans] [helvetica]        [default] [rscale=auto]
    \definetypeface[mainface][mm][math] [pagellaovereuler] [default] [rscale=auto]
    
    \setupbodyfont[mainface,12pt]
    
    \appendtoks \rm \to \everymathematics
    \setupmathematics
      [lcgreek=normal, ucgreek=normal]
    
    \starttext
    
    \startformula
       {\Bbb P}(x) = \sum_{i=1}^n α_i x^i
    \stopformula
    
    \stoptext
    

I get the following output:

enter image description here

Note that Euler opentype font is not complete. The pagellaovereuler typescript loads Pagella as a fallback font, so the missing symbols (like the blackboard bold P in the above example) are taken from Pagella.

  • Euler now works under 2013.11.10 12:23 MKIV beta. While Euler is not to everybody's taste, I find it pleasing to the eye. – Barry Dec 13 '13 at 14:45
  • Neither mtxrun --expand-var=TEXMF nor mtxrun --expand-var=TEXMFHOME show a list of folders searched by ConTeXt. Is there a solution to this? Many thanks for all your help Aditya. – Barry Dec 13 '13 at 14:52
  • After just installing Neo Euler as a system font on Mac OSX, I found that step 2 just shows nothing, and that step 3 was not needed. – Thruston May 21 '15 at 18:13
  • My instructions assumed that you are using ConTeXt standalone. The exact variable name might be different in texlive. ConTeXt runs step 3 in the background if a font is not found, and that might be the reason why it worked without that step as well. – Aditya May 21 '15 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.