[XeTeX] fontspec's \setmathrm seems to have no effect

Daniel Greenhoe dgreenhoe at gmail.com
Fri Sep 2 01:08:47 CEST 2011


Thank you Peter and Mskala for your help.

> I don't know how to change the
> behaviour of \mathit; fontspec doesn't seem to have a \setmathit command,

Does anyone know if it is possible to use fontspec to set the fonts
for math objects such as operators, letters, and symbols?

The package mathpazo.sty sets these to Palatino (or something similar)
using what is apparently an NFSS scheme similar to this:

 \DeclareSymbolFont{operators}     {OT1}{ppl} {m}{n}
 \DeclareSymbolFont{upright}       {OT1}{zplm}{m}{n}
 \DeclareSymbolFont{letters}       {OML}{zplm}{m}{it}
 \DeclareSymbolFont{symbols}       {OMS}{zplm}{m}{n}
 \DeclareSymbolFont{largesymbols}  {OMX}{zplm}{m}{n}

 \SetSymbolFont{operators}   {bold}{OT1}{ppl}{b}{n}
 \SetSymbolFont{upright}     {bold}{OT1}{zplm}{b}{n}
 \SetSymbolFont{letters}     {bold}{OML}{zplm}{b}{it}
 \SetSymbolFont{symbols}     {bold}{OMS}{zplm}{b}{n}
 \SetSymbolFont{largesymbols}{bold}{OMX}{zplm}{m}{n}

 \DeclareMathAlphabet{\mathit}     {OT1}{ppl}{m}{it}
 \DeclareMathAlphabet{\mathbf}     {OT1}{zplm}{b}{n}
 \DeclareMathAlphabet{\mathbold}   {OML}{zplm}{b}{it}

 \SetMathAlphabet{\mathit}   {bold}{OT1}{ppl}{b}{it}

 \DeclareSymbolFontAlphabet{\mathrm}    {operators}
 \DeclareSymbolFontAlphabet{\mathnormal}{letters}
 \DeclareSymbolFontAlphabet{\mathcal}   {symbols}

Is there an equivalent fontspec scheme?

Alternatively, if NFSS is the only option, how would I find the code
letters (e.g. ppl or zplm) for a given font such as for the
Asana-Math.otf font that comes with TeXlive?

Many thanks in advance,
Dan


On Fri, Sep 2, 2011 at 1:08 AM,  <mskala at ansuz.sooke.bc.ca> wrote:
> On Thu, 1 Sep 2011, Daniel Greenhoe wrote:
>> $abcdefgh$\\
>
>> * The second line (in math mode) I would think should be mono-spaced
>> because of the \setmathrm command; but instead it seems to be maybe a
>> proportional computer modern font.
>
> Letters inside $..$ without other markup are not set in \mathrm but in
> \mathit; and \setmathrm only changes \mathrm.  If you change that line to:
>
> $\mathrm{abcdefgh}$\\
>
> then it sets the letters in monospace.  I don't know how to change the
> behaviour of \mathit; fontspec doesn't seem to have a \setmathit command,
> and it looks like that one may be more complicated to change than \mathrm.
> --
> Matthew Skala
> mskala at ansuz.sooke.bc.ca                 People before principles.
> http://ansuz.sooke.bc.ca/
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



More information about the XeTeX mailing list