[XeTeX] Croping PDF and Fonts in Math!
Bruno Voisin
bvoisin at mac.com
Tue Oct 11 16:22:19 CEST 2005
Le 11 oct. 05 à 15:24, Suki Venkat, [TnQ] a écrit :
> (2) I would like to use some of the text fonts in MathMode. Can I
> change
> the default font-family in MathMode?
The easy way: use the fontspec package, it takes care of this for you.
The harder way: in case you defined your text fonts yourself, with
stuff like:
\DeclareFontFamily{U}{optima}{}
\DeclareFontShape{U}{optima}{m}{n}
{<-> "Optima\space Regular:mapping=tex-text"}{}
\DeclareFontShape{U}{optima}{m}{it}
{<-> "Optima\space Italic:mapping=tex-text"}{}
\DeclareFontShape{U}{optima}{b}{n}
{<-> "Optima\space Bold:mapping=tex-text"}{}
\DeclareFontShape{U}{optima}{b}{it}
{<-> "Optima\space Bold\space Italic:mapping=tex-text"}{}
\DeclareFontShape{U}{optima}{m}{sl}
{<-> ssub * optima/m/it}{}
\DeclareFontShape{U}{optima}{b}{sl}
{<-> ssub * optima/b/it}{}
\DeclareFontShape{U}{optima}{bx}{n}
{<-> ssub * optima/b/n}{}
\DeclareFontShape{U}{optima}{bx}{it}
{<-> ssub * optima/b/it}{}
\DeclareFontShape{U}{optima}{bx}{sl}
{<-> ssub * optima/b/it}{}
\renewcommand{\sfdefault}{optima}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\encodingdefault}{U}
then all you have to do is add:
\SetSymbolFont{operators}{normal}{\encodingdefault}{\familydefault}{m}
{n}
\SetSymbolFont{operators}{bold} {\encodingdefault}{\familydefault}{b}
{n}
\SetMathAlphabet{\mathrm}{normal}{\encodingdefault}{\familydefault}{m}
{n}
\SetMathAlphabet{\mathbf}{normal}{\encodingdefault}{\familydefault}{b}
{n}
\SetMathAlphabet{\mathit}{normal}{\encodingdefault}{\familydefault}{m}
{it}
\SetMathAlphabet{\mathrm}{bold} {\encodingdefault}{\familydefault}{b}
{n}
\SetMathAlphabet{\mathit}{bold} {\encodingdefault}{\familydefault}{b}
{it}
Beware: it's not fullproof at all, and may create problems with math
accents, in particular. fontspec takes steps to make sure this does
not happen.
Bruno Voisin
More information about the XeTeX
mailing list