3

The problem I am facing is that I am typesetting with MinionPro-Regular.otf as the main font and MinionPro-Cn.otf for the captions. However I have to declare only one math font for the whole document, thus math symbols and little siunitx things are not condensed.

Unfortunately \setmathsfont from mathspec does work only once in the preamble. Is there a way to change math font as you change the text font with fontspec? I don't need to typeset big formulas in captions only some numbers which are typeset using siunitx.

MWE:

\documentclass[10pt,a4paper]{memoir} 
\usepackage[english]{babel}
z\usepackage[detect-all]{siunitx}
\usepackage[MnSymbol]{mathspec}

\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{MinionPro-Regular.otf}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{MinionPro-Bold.otf}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{MinionPro-It.otf}
\setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{MinionPro-BoldIt.otf}

\defaultfontfeatures{Ligatures={TeX,NoCommon},Scale=MatchLowercase}
\setmainfont[BoldFont=MinionPro-Bold.otf,
               ItalicFont=MinionPro-It.otf,
               BoldItalicFont=MinionPro-BoldIt.otf,
               Color=black]{MinionPro-Regular.otf}         
               
\newfontfamily\captionfont[ItalicFont=MinionPro-MediumCnIt.otf]{%
                           MinionPro-Regular.otf}

\newcommand*{\mathtext}{\SI{2.3}{\micro\metre} %
2.3\,μm $x=2.3\,\mu m$}

\begin{document}\noindent
{\normalfont\itshape\mathtext} \\
{\captionfont\itshape\mathtext}\\

\end{document}

Output: enter image description here

If you look carefully the \mu symbol in siunitx in the second line is chosen from \normalfont not \captionfont. Also although I am using Mnsymbol the symbols are still from Computer Modern.

2
  • 1
    Did you try \usepackage{MnSymbol}?
    – egreg
    Nov 23, 2012 at 21:15
  • @egreg, yes it is there. MWE added now.
    – rowman
    Nov 25, 2012 at 18:07

1 Answer 1

1

As you have a variable font for the 'unit' part of quantities, and that is a text mode font, I think you are best off using text mode with siunitx

\sisetup{unit-mode = text}

This will then use whatever the current text font is for units, so the math font will have no impact. (Untested as I don't have the appropriate fonts.)

You must log in to answer this question.

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