# General guide on how to set up Minion Pro for math in lualatex

## Minion Pro

is one of the most beautiful fonts and comes with many Adobe products. A complementary set of symbols is provided by the MnSymbol fonts and package, which is not fully compatible to lualatex.

However the best option would be Minion Math, which is commercial, with hardly any free alternative. But...

## I'd like to use Minion Pro also for math in lualatex - how can I do that?

This answer already gives a good starting point and this one provides extensive explanations around this issue. There are various more questions about this topic, but I haven't found one giving a complete solution.

Using the linked starting point, one already gets all letters of Minion Pro in the math environment together with mathematical symbols provided by MnSymbol:

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage{fontspec}
\usepackage{unicode-math}

\setmainfont[Numbers = OldStyle,Ligatures = TeX,SmallCapsFeatures = {Renderer=Basic}]{Minion Pro}
\setmathfont{MnSymbol}
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{MinionPro-Bold}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{MinionPro-It}
\setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{MinionPro-BoldIt}
\setmathrm{Minion Pro}

\begin{document}

$$\mathscr{D}^{\gamma} f(t)= \mathscr{D}^{m} \mathscr{I}^{m-\gamma} f(t)=\frac{\partial^m }{\partial t^m} \Bigg[ \frac{1}{\Gamma(m-\gamma)} \int\limits_{0}^{t} \frac{f(\tau )}{(t-\tau)^{\gamma-m+1}} ~\partial{\tau} \Bigg] \:,$$

$$A = \left( \begin{array}{ccc} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{array} \right) \qquad B = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}$$

$$y = \sqrt{\frac{z^2}{\ln{z}}} + z \,\Bigg|_{z\,=\,z_0}$$

\end{document}


The minimal example from the other linked answer comes out quite faulty as well.

## There are a lot of things not working correctly:

1. partial differential \partial and the vertical line character | is missing
2. the integral and \sum symbols are too small
3. all brackets are not scaling with size of its wrapped content and size specifier like \Bigg( don't work neither
4. brackets of matrices don't work
5. the square root does not scale
6. \mathscr does not bring any difference
7. the comma symbol is missing
8. the greek letter epsilon is undefined in MinionPro (at least in old font versions)
9. to be continued ...

How can I fix them?

## There is an alternative approach avoiding unicode-math

and use the non-unicode implementation of MnSymbol

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage[no-math]{fontspec}
\usepackage{MnSymbol}

\setmainfont[...

\begin{document}
...


Which is certainly a working option, but everything looks a little mixed up and I'm not happy with the result.

If you consider this the better approach, feel free to post an answer providing a solution, which gets everything harmonizing a little better.

I'm aware that there are no real solutions unless the OpenType version of MnSymbol gets patched for use in unicode-math. This question is self-answered as I thought it would be worth sharing the (in my opinion) pleasant result, though it is just an ugly workaround.

Please feel free to provide better and simpler workarounds or even part-solutions.

## The bottom line at the top.

Don't try this at home kids! Using MnSymbol with unicode-math will kill your time!

The symbols provided by MnSymbol are not set up for use with unicode-math. Some are missing, some are not scalable in size. These need to be replaced by a different math font. For my opinion XITS Math does a good job. One just needs to find the unicode characters due to fix.

Partial differential \partial:

\setmathfont[range={"2202} ]{XITS Math}


The integrals with an additional little tweak:

\setmathfont[range={"222B-"2233,"2A0B-"2A1C}]{XITS Math}
\newcommand{\intX}[2]{\int\limits_{\mkern-15mu #1}^{#2} \mkern-15mu}


For the sum symbol I personally find the Latin Modern Math symbol a better match:

\setmathfont[range={"2211} ]{Latin Modern Math}


The brackets come with a quite heavy weight in XITS Math, so also used Latin Modern Math in this case:

\setmathfont[range={"005B,"005D,"0028,"0029,"007B,"007D} ]{Latin Modern Math}


The vertical line character though, is too bold there, so back to XITS Math

\setmathfont[range={"007C} ]{XITS Math}


Fixing the root:

\setmathfont[range={"002F,"221A}]{XITS Math}


and the comma:

\setmathfont[range={"002C} ]{XITS Math}


and finally the \mathscr and additionally the \mathrm characters

\setmathfont[range=\mathscr,StylisticSet={1}]{XITS Math}
\setmathrm{Minion Pro}


The letter \epsilon is missing, but \varepsilon is working. As we use unicode-math the replacement with \let needs to be done at the begin of the document:

\AtBeginDocument{%
\let\phi\varphi
\let\epsilon\varepsilon
}


or \AfterEndPreamble in case there are problems with hyperref and the etoolbox package.

One further problem is the slash /, where it is a matter of taste, which font should be use for replacement.

\setmathfont[range={"002F,"2215}]{Latin Modern Math}


But the actual mistake of the author of the original MWE was, that he should have used \mathbin{/} instead of / for a better spacing.

All these fixes together give a pleasant result:

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage{fontspec}
\usepackage{unicode-math}

\setmainfont[Numbers = OldStyle,Ligatures = TeX,SmallCapsFeatures = {Renderer=Basic}]{Minion Pro}
\setsansfont[Numbers={OldStyle,Proportional},Scale=MatchLowercase]{Minion Pro}
\setmonofont[Numbers=OldStyle,Scale=MatchLowercase]{Minion Pro}

\setmathfont{MnSymbol}
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{MinionPro-Bold}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{MinionPro-It}
\setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{MinionPro-BoldIt}
\setmathfont[range=\mathscr,StylisticSet={1}]{XITS Math}
\setmathfont[range={"005B,"005D,"0028,"0029,"007B,"007D} ]{Latin Modern Math} % brackets
\setmathfont[range={"2202} ]{XITS Math}  % partial
\setmathfont[range={"2211} ]{Latin Modern Math}  % sum
\setmathfont[range={"007C} ]{XITS Math}  % vertical
\setmathfont[range={"221A} ]{XITS Math}  % root
\setmathfont[range={"222B-"2233,"2A0B-"2A1C}]{XITS Math}  % integrals
\setmathfont[range={"002F,"2215}]{Latin Modern Math} % /
\setmathfont[range={"002C} ]{XITS Math} % ,
\setmathrm{Minion Pro}

\newcommand{\intX}[2]{\int\limits_{\mkern-15mu #1}^{#2} \mkern-15mu}

\AtBeginDocument{\let\epsilon\varepsilon}

\begin{document}
...


Also the output produced by \blindmathpaper looks nice:

## The neverending story.

Probably you will still find something missing. The last issue I encountered before I gave up, was the missing full stop/punctuation mark as discussed in this question and also solved with this answer. But even then commands like \dots still did not work. Realizing that one needs to fix almost everything of MnSymbol, so actually nothing is left, I decided to use another math font and just included some certain symbols of MnSymbol I'd liked.

I finally use this settings:

\setmathfont{XITS Math}
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{MinionPro-Bold}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{MinionPro-It}
\setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{MinionPro-BoldIt}
\setmathfont[range=\mathscr,StylisticSet={1}]{XITS Math}
\setmathfont[range={"005B,"005D,"0028,"0029,"007B,"007D,"2211,"002F,"2215 } ]{Latin Modern Math} % brackets, sum, /
\setmathfont[range={"002B,"002D,"003A-"003E} ]{MnSymbol} % + - < = >
\setmathrm{Minion Pro}


## The bottom line at the bottom.

Don't try this at home kids! Using MnSymbol with unicode-math will kill your time!

The whole thing is so buggy, that it is not worth trying. Maybe in the future. Using another font as base and include certain symbols from MnSymbol seems appropriate though.

• MnSymbol includes all necessary symbols. Using the MinionPro and MnSymbol package with pdflatex produces very good results. – sebschub Apr 12 '15 at 12:38
• With lualatex obviously not. That what this Q&A is supposed to fix. – thewaywewalk Apr 12 '15 at 15:03
• Well, the symbols are present in the font but the set-up is not correct. Thus, a better solution would be correct the set-up, if that's possible... – sebschub Apr 12 '15 at 18:17
• @sebschub sure, this is discussed extensively in one of the linked answers. I'm aware that this is just a workaround. Feel free to post a different approach :) – thewaywewalk Apr 12 '15 at 18:27
• @sebschub there is a bug in MinionPro package with minionint option and using \complement command – juanuni Aug 1 '16 at 4:14