Difference between revisions of "math calligraphic"

From Wiki
Jump to navigation Jump to search
Line 33: Line 33:
  
 
tells mkiv that the fallback font for mainface in math mode comes from Asana Math, as far as the slots of lowercase and uppercase calligraphic glyphs are concerned.
 
tells mkiv that the fallback font for mainface in math mode comes from Asana Math, as far as the slots of lowercase and uppercase calligraphic glyphs are concerned.
 +
 +
If one wishes to use for instance Palatino instead of Latin Modern as the text font, it is enough to replace
 +
<texcode>
 +
\definefontfamily [mainface] [rm] [Latin Modern]
 +
</texcode>
 +
with
 +
<texcode>
 +
\definefontfamily [mainface] [rm] [Palatino]
 +
</texcode>

Revision as of 20:34, 21 May 2014

Using math calligraphic fonts in mkiv

In mkii it is possible to replace the standard calligraphic math fonts with rsfs (Ralph Smith's Formal Script fonts): see the dedicated page on this wiki [1].

However this does not work properly in mkiv, where nevertheless it is rather easy to specify any font to be used for the calligraphic math fonts. For instance let us assume that we want to use math calligraphic fonts from Asana Math, while other characters come from Latin Modern. To do so, use the following setups:

\definefallbackfamily[mainface][math][Asana Math][range={1D49C-1D4CF,212C,2130,2131,210B,2110,2112,2133,211B,212F,210A,2134}]

\definefontfamily [mainface] [rm] [Latin Modern]
\definefontfamily [mainface] [math] [Latin Modern Math]

\setupbodyfont[mainface]

\starttext
${\cal ABCDEFGHIJKLMNOPQRSTUVWXYZ}$

${\cal abcdefghijklmnopqrstuvwxyz}$

The space of distributions on $\Omega$ is denoted by ${\cal D}'(\Omega)$, while ${\cal S}({\Bbb R}^n)$ is the space of Schwartz functions, and ${\cal S}'({\Bbb R}^n)$ is its dual.
\startformula
\langle T,\phi \rangle_{{\cal D}'(\Omega),{\cal D}(\Omega)}
\stopformula
The set of admissible controls is denoted by ${\cal U}_{\rm ad}$.
\stoptext

Here, the command

\definefallbackfamily[mainface][math][Asana Math][range={1D49C-1D4CF,212C,2130,2131,210B,2110,2112,2133,211B,212F,210A,2134}]

tells mkiv that the fallback font for mainface in math mode comes from Asana Math, as far as the slots of lowercase and uppercase calligraphic glyphs are concerned.

If one wishes to use for instance Palatino instead of Latin Modern as the text font, it is enough to replace

\definefontfamily [mainface] [rm] [Latin Modern]

with

\definefontfamily [mainface] [rm] [Palatino]