Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
1  
Did you try \usepackage{MnSymbol}? –  egreg Nov 23 '12 at 21:15
    
@egreg, yes it is there. MWE added now. –  rowman Nov 25 '12 at 18:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.