Changes

Jump to navigation Jump to search
2,162 bytes added ,  17:19, 5 February 2019
m
= Using Math fonts in MkIV =
 
ConTeXt ships with typescript for the following math fonts. To use these typescripts, either use
 
<texcode>
\setupbodyfont[<em>&lt;name&gt;</em>]
</texcode>
 
To combine these math fonts with other text fonts, create your own typescript
 
<texcode>
\definetypeface[<em>&lt;typescript-name&gt;</em>][mm][<em>&lt;name&gt;</em>][default]
....
\setupbodyfont[<em>&lt;typescript-name&gt;</em>]
</texcode>
 
{| cellpadding="2" style="border: 1px solid darkgray;"
|-
! style="background: #efefef;" | Font Name
! style="background: #efefef;" | Typescript Name
! style="background: #efefef;" | Extra information
|-
| Latin Modern || modern
|-
| Termes (Times clone) || times || Use <code>\enablemode[txmath]</code> to use txmath fonts (better don’t)
|-
| Pagella (Palatino clone) || palatino || Use <code>\enablemode[pxmath]</code> to use pxmath fonts (better don’t)
|-
| Bonum (Bookman clone) || bonum
|-
| Schola (Century Schoolbook clone) || schola
|-
| Iwona || iwona || sans
|-
| Antykwa Torunska || antykwa-torunska
|-
| Lucida (Opentype fonts) || lucidaot || Add <code>\loadtypescriptfile[lucida-opentype]</code> before the font directives
|-
| Lucida (Type One fonts) || lucida || Add <code>\loadtypescriptfile[lucida-typeone]</code> before the font directives. (Better don’t use.)
|-
| XITS (Opentype version of STIX) || xits
|-
| XITS (BiDi support) || xitsbidi
|-
| Asana (Palatino clone) || asana
|-
| Palatino Informal || informal || sans
|-
| Mathdesign Charter || charter || Add <code>\loadtypescriptfile[mathdesign]</code> before the font directives
|-
| Mathdesign Garamond || garamond || Add <code>\loadtypescriptfile[mathdesign]</code> before the font directives
|-
| Mathdesign Utopia || utopia || Add <code>\loadtypescriptfile[mathdesign]</code> before the font directives
|-
| HV Math || hvmath
|-
| Math times || mathtimes
|-
| Cambria || cambria
|-
| Euler (Fallback on Palatino) || pagellaovereuler || Add <code>\appendtoks \rm \to \everymathematics</code>
<code>\setupmathematics[lcgreek=normal, ucgreek=normal]</code> '''after''' the font directives.
|}
 
= Old Article =
 
This article is about various mathematical fonts that can be used in ConTeXt; it doubles as a list of math fonts. Tweaks are collected here; longer pieces of code are given their own article.
== TeX Gyre ==
The GUST foundry, the creator of the [[TeX Gyre]] fonts, has created [http://oldwwwwww.gust.org.pl/projects/e-foundry/tg-math OTF math fonts] to go with Pagella (Palatino) and , Termes (Times). Math fonts for , Bonum (Bookman) and Schola (New Century Schoolbook) are planned for the future. Using these fonts for math is automatically enabled when you set the appropriate bodyfont.
<texcode>
\setupbodyfont[palatino] % or pagella
% or
\setupbodyfont[times] % or termes% or\setupbodyfont[bookman] % or termesbonum% or\setupbodyfont[schoolbook] % or schola
</texcode>
There exist also virtual versions of these fonts. The virtual counterparts are adaptations of the old TFM/Type1 fonts so they look like OpenType math fonts to the engine. ConTeXt Mark IV MkIV used them for a while so that it could move entirely to Unicode/OpenType math while waiting for the real OpenType fonts, and quite some tweaks went into making them look good. They are still better in some areas, like hinting and stacked arror relations.{{since|2012|text=nov 2012}}.  If you want to keep the old behaviour, type
<texcode>
</texcode>
at the top of your document. This does not set the math font directly; rather it specifies that if Pagella or Termes is used for maths, ConTeXt should use the virtual font instead of the non-virtual one.(This made sense in 2012, but not any more since 2014.)
== Blackboard bold ==

Navigation menu