When using pdfLaTeX it is sometimes possible, when using different text and math font sets, to take the fonts for operators like sin and cos from the text font even within formulae. Thus, using the lucimatx package, I can write


and then formulae will be set using lucida for math fonts, but charter (i.e., bch) for text-like objects like sin and cos, so matching the text using in the document body. This is what one wants from a typographic standpoint.

Is something similar possible using unicode-math? If I use

\setmainfont{Charis SIL}   % Charis is a charter clone

It seems to use lucida fonts for everything in math mode. The same if I use xits math fonts. I may, of course, be missing the equivalent of the onlymath option in unicode-math. Any help would be appreciated.

Regards Geoff Vallis

  • Welcome to TeX.SE! A quick hint: if you indent lines by four spaces, they will be autoformatted as LaTeX code.
    – Mico
    Oct 14, 2013 at 12:24
  • Thanks for the edits and the hints. I'm new to TeX.SE (and to unicode-math).
    – GeoffV
    Oct 14, 2013 at 13:02

1 Answer 1


I'm not really sure you want to mix Charis SIL and Lucida Bright Math. However, here's the workaround you're looking for:

\setmainfont{Charis SIL}   % Charis is a charter clone
\setmathfont[range={`A-`Z,`a-`z}]{Charis SIL}

sin $\sin x=y$ \textit{x}

The “sin” outside the formula is just to show that Charis SIL is really used for the operator. The trailing italic “x” is for comparing with the math mode “x”.

You'll get warnings such as

Font 'Charis SIL' does not contain script 'Math'.

that are unavoidable. Note the Scale option for loading Lucida Bright Math.

enter image description here

  • Thanks. Your solution almost works but not quite because upright operators like \nabla need to be taken from the original math font and not the text font. Building on your code it seems that a working solution mimicking the 'onlymath' option is: \documentclass{article} \usepackage{unicode-math} \setmainfont{Charis SIL} % Charis is a charter clone \setmathfont[Scale=MatchLowercase]{LucidaBrightMathOT.otf} \setmathfont[range=\mathup/{latin,Latin,num}]{Charis SIL} \begin{document} sin $\sin x=y $ \textit{x} and $\nabla x = 123$123 \end{document}
    – GeoffV
    Oct 14, 2013 at 17:07
  • @Geoff Check with the new version.
    – egreg
    Oct 14, 2013 at 17:11
  • @egeg Or, to get the numbers in the text font: \setmathfont[range={A-Z,a-z,1-9}]{Charis SIL} (I haven't figured out the proper formatting in posts yet, sorry!)
    – GeoffV
    Oct 14, 2013 at 17:19
  • I guess that range=\mathup/{latin,Latin,num} is the best approach.
    – egreg
    Oct 14, 2013 at 17:24
  • Yes I agree. I consider this question answered and will so mark it if I can figure that out...
    – GeoffV
    Oct 14, 2013 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .