[XeTeX] Using math font packages with fontspec

Herbert Schulz herbs at wideopenwest.com
Wed May 23 21:34:53 CEST 2007


On May 23, 2007, at 12:05 PM, Hendrik Fuß wrote:

> Hi everyone,
>
> I need some advice regarding fontspec. I want to use a math font that
> better matches the main text font in my document. The manual gives an
> example for using the euler package. However, the example doesn't work
> with my setup (TeXlive 2007 on Mac OS X). Instead, xelatex uses the
> latin modern fonts. Here's my test document:
>
> \documentclass{article}
> \usepackage[mathcal]{euler}
> \usepackage{fontspec,xunicode}
> \setmainfont{Optima Regular}
> \begin{document}
> 	Main font $ f(x) = a \cdot b \cdot c $
> \end{document}
>
> Upon looking in the .log file I can see that first the euler package
> redefines the math fonts, and after that fontspec loads the lmodern
> package, thus reversing the effect of euler.
>
> Exchanging the order of \usepackage commands doesn't work either --
> fontspec insists that euler must be loaded first.
>
> Any advice?
>
> thanks
> Hendrik

Howdy,

You might try using fontspec with the cm-default option:
...
\usepackage[cm-default]{fontspec}
\usepackage{xunicode}
... .

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)




More information about the XeTeX mailing list