I am using


to change the "text" font in my latex document. However this has messed up some math equations and things like

\mathbf{E} \exp \sin \cos

are also displayed using the font for the text which makes it look ugly and inconsistent with the rest of equation.

Is there a way to fix this so that the above specified font is only used for text and not anywhere in the equations?


\usepackage[no-math]{fontspec} instead of xltxtra (assuming that you have a recent fontspec).

  • I have to use xltxtra since Ubuntu is a ttf font – behzad.nouri Jul 4 '11 at 14:46
  • @user6530 xltxtra loads fontspec, and unless you need some of the specific functions it offers, (mainly the XeTeX logos) it is no longer needed. fontspec is the main package for using fonts of any sort with XeLaTeX. – Alan Munn Jul 4 '11 at 14:56
  • @user6530: Why do you reject my suggestion without trying it? – Ulrike Fischer Jul 4 '11 at 15:02
  • 1
    Well I wrote \usepackage[no-math]{fontspec} not \usepackage[no-math]{Ubunut}. Beside this: fontspec has a documentation. – Ulrike Fischer Jul 4 '11 at 15:12
  • 6
    If you are not willing to search and peruse a documentation of a package: Don't use latex. It is not the right system for you. – Ulrike Fischer Jul 4 '11 at 16:07

You could also try to load the mathspec package before xltxtra (or fontspec)


Optionally, you can define then a specific math font.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.