Difference between revisions of "Math fonts"

From Wiki
Jump to navigation Jump to search
m
(2 intermediate revisions by the same user not shown)
Line 23: Line 23:
 
| Latin Modern || modern
 
| Latin Modern || modern
 
|-
 
|-
| Termes (Times clone) || times || Use <code>\enablemode[txmath]</code> to use txmath fonts
+
| 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
+
| Pagella (Palatino clone) || palatino || Use <code>\enablemode[pxmath]</code> to use pxmath fonts (better don’t)
 
|-
 
|-
 
| Bonum (Bookman clone) || bonum
 
| Bonum (Bookman clone) || bonum
 
|-
 
|-
| Iwona || iwona
+
| Schola (Century Schoolbook clone) || schola
 +
|-
 +
| Iwona || iwona || sans
 
|-
 
|-
 
| Antykwa Torunska || antykwa-torunska
 
| Antykwa Torunska || antykwa-torunska
 
|-
 
|-
| Lucida (Opentype fonts) || lucidanova || Add <code>\loadtypescriptfile[lucida-opentype]</code> before the font directives
+
| 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.
+
| 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 (Opentype version of STIX) || xits
Line 43: Line 45:
 
| Asana (Palatino clone) || asana
 
| Asana (Palatino clone) || asana
 
|-
 
|-
| HV Math || hvmath
+
| Palatino Informal || informal || sans
|-
 
| Informal || informal
 
 
|-
 
|-
 
| Mathdesign Charter || charter || Add <code>\loadtypescriptfile[mathdesign]</code> before the font directives
 
| Mathdesign Charter || charter || Add <code>\loadtypescriptfile[mathdesign]</code> before the font directives
Line 52: Line 52:
 
|-
 
|-
 
| Mathdesign Utopia || utopia || 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
 
| Math times || mathtimes
Line 60: Line 62:
 
<code>\setupmathematics[lcgreek=normal, ucgreek=normal]</code> '''after''' the font directives.
 
<code>\setupmathematics[lcgreek=normal, ucgreek=normal]</code> '''after''' the font directives.
 
|}
 
|}
 
  
 
= Old Article =
 
= Old Article =
Line 77: Line 78:
 
== TeX Gyre ==
 
== TeX Gyre ==
  
The GUST foundry, the creator of the [[TeX Gyre]] fonts, has created [http://oldwww.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.
+
The GUST foundry, the creator of the [[TeX Gyre]] fonts, has created [http://www.gust.org.pl/projects/e-foundry/tg-math OTF math fonts] to go with Pagella (Palatino), Termes (Times), Bonum (Bookman) and Schola (New Century Schoolbook). Using these fonts for math is automatically enabled when you set the appropriate bodyfont.
  
 
<texcode>
 
<texcode>
\setupbodyfont[palatino] % or pagella
+
\setupbodyfont[palatino]   % or pagella
 +
% or
 +
\setupbodyfont[times]      % or termes
 +
% or
 +
\setupbodyfont[bookman]    % or bonum
 
% or
 
% or
\setupbodyfont[times]   % or termes
+
\setupbodyfont[schoolbook] % or schola
 
</texcode>
 
</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 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
+
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 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.  
 +
 
 +
If you want to keep the old behaviour, type
  
 
<texcode>
 
<texcode>
Line 91: Line 98:
 
</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.
+
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 ==
 
== Blackboard bold ==

Revision as of 17:19, 5 February 2019

Using Math fonts in MkIV

ConTeXt ships with typescript for the following math fonts. To use these typescripts, either use

\setupbodyfont[<name>]

To combine these math fonts with other text fonts, create your own typescript

\definetypeface[<typescript-name>][mm][<name>][default]
....
\setupbodyfont[<typescript-name>]
Font Name Typescript Name Extra information
Latin Modern modern
Termes (Times clone) times Use \enablemode[txmath] to use txmath fonts (better don’t)
Pagella (Palatino clone) palatino Use \enablemode[pxmath] 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 \loadtypescriptfile[lucida-opentype] before the font directives
Lucida (Type One fonts) lucida Add \loadtypescriptfile[lucida-typeone] 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 \loadtypescriptfile[mathdesign] before the font directives
Mathdesign Garamond garamond Add \loadtypescriptfile[mathdesign] before the font directives
Mathdesign Utopia utopia Add \loadtypescriptfile[mathdesign] before the font directives
HV Math hvmath
Math times mathtimes
Cambria cambria
Euler (Fallback on Palatino) pagellaovereuler Add \appendtoks \rm \to \everymathematics

\setupmathematics[lcgreek=normal, ucgreek=normal] 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.

Latin Modern

Latin Modern is an OTF remake of the Computer Modern fonts, and the default ConteXt font. The OpenType Latin Modern Math is ConTeXt Mark IV 's default math font. While the OTF Latin Modern Math was under development, ConTeXt used the Type1 version, hacked to look like OTF to the engine, and with some tweaks on top. If you still want the old behaviour, you can put

\enablemode[lmmath]

at the top of your document.

TeX Gyre

The GUST foundry, the creator of the TeX Gyre fonts, has created OTF math fonts to go with Pagella (Palatino), Termes (Times), Bonum (Bookman) and Schola (New Century Schoolbook). Using these fonts for math is automatically enabled when you set the appropriate bodyfont.

\setupbodyfont[palatino]   % or pagella
% or
\setupbodyfont[times]      % or termes
% or
\setupbodyfont[bookman]    % or bonum
% or
\setupbodyfont[schoolbook] % or schola

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

If you want to keep the old behaviour, type

\enablemode[txmath,pxmath]

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

Blackboard bold is built into Latin Modern and ConTeXt. Use it like so:

\blackboard{Z}

See Blackboard bold for further details.

Euler

Euler is a math font created by Hermann Zapf. It combines well with Palatino, inter alia; see Palatino with Euler for Math. See also the Euler in ConTeXt My Way by Adam Lindsay.

Doublestroke

The doublestroke fonts are an alternative to the msbm blackboard bold font. To use them with ConTeXt, see Doublestroke.

Ralph Smith's formal script

Rsfs.png
Ralph Smith's Formal Script is a script alphabet that blends well with Latin Modern. Typescript instructions are on the Rsfs page.


Bold math

See Bold Math