I'd go directly to unicode-math:
\documentclass[a4paper]{article}
\usepackage{mathtools} % loads amsmath that should go before unicode-math
\usepackage{unicode-math}
\setmainfont[Numbers=OldStyle]{Palatino Linotype}
\setsansfont{Optima}
\setmonofont{Consolas}
\setmathfont{Asana Math}
Asana Math is based on the MathPaZo fonts.
If you really need brackets and parentheses from the MathPaZo fonts, it's doable:
\DeclareSymbolFont{brackets} {OT1}{zplm}{m}{n}
\SetSymbolFont{brackets}{bold} {OT1}{zplm}{b}{n}
\DeclareSymbolFont{largebrackets} {OMX}{zplm}{m}{n}
\SetSymbolFont{largebrackets}{bold}{OMX}{zplm}{m}{n}
\DeclareMathDelimiter{(}{\mathopen} {brackets}{"28}{largebrackets}{"00}
\DeclareMathDelimiter{)}{\mathclose}{brackets}{"29}{largebrackets}{"01}
\DeclareMathDelimiter{[}{\mathopen} {brackets}{"5B}{largebrackets}{"02}
\DeclareMathDelimiter{]}{\mathclose}{brackets}{"5D}{largebrackets}{"03}
For the Knuth calligraphic font, add
\setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{XITS Math}
For a "better" \vDash
symbol, add
\setmathfont[range=\vDash]{XITS Math}
The "not belonging to" symbol should always be specified with \notin
rather than with \not\in
.
Finally, for the AMS blackboard bold:
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\protected\def\mathbb#1{{\mathchar\numexpr256*\symAMSb+`#1\relax}}
Using unicode-math
:
\usepackage{amsmath} % always load before mathspec or unicode-math
\usepackage[math-style=ISO]{unicode-math} % try sans-style=upright
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\setmainfont[Numbers={OldStyle,Proportional},SmallCapsFeatures={LetterSpace=6},%
BoldFont={Myriad Pro Bold},BoldFeatures={LetterSpace=3}]{Minion Pro}
\setsansfont[Numbers={OldStyle,Proportional},LetterSpace=3]{Myriad Pro}
\setmonofont{Crystal}
\setmathfont{xits-math.otf}
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro}
\setmathfont[range=\mathsf/{num,latin,Latin,greek,Greek}]{Myriad Pro}
\setmathfont[range=\mathbfsf/{num,latin,Latin,greek,Greek}]{Myriad Pro Bold}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]%
{Minion Pro Italic}
\setmathfont[range=\mathsfit/{num,latin,Latin,greek,Greek}]%
{Myriad Pro Italic}
\setmathfont[range=\mathbfsfit/{num,latin,Latin,greek,Greek}]%
{Myriad Pro Bold Italic}
\setmathfont[range=\mathtt->\mathup]{Crystal}
\let\mathbf\mathbfsf
\let\mathbfit\mathbfsfit
\AtBeginDocument{\let\phi\varphi}
(N.B. unicode-math
loads fontspec
, xltxtra
, and xunicode
)
mathbb
, mathscr
, &c. all have sensible defaults with this. If you want, say, serifed mathbb
, you could add \setmathfont[range=\mathbb/{Latin}->\mathup,Scale=MatchUppercase]{Hoefler Text Engraved}
. The /{Latin}
part applies it only to uppercase latin letters.
- Use
BoldFont
and BoldFeatures
with fontspec
. For unicode-math
, I just used \let
commands, although I know there's probably a more elegant way to do this.
- Removing
MnSymbol
frees up a lot of math alphabets, and unicode-math
increases the limit.
- Apparently Ubuntu Mono is bugged; I couldn't use it, so I tested with Crystal. And it works.
EDIT: To use Minion for even more symbols, you could replace the \mathup
line with:
\setmathfont[range={\mathup/{num,latin,Latin,greek,Greek},\question,\exclam,\mathdollar,%
\percent,\ampersand,\lparen,\rparen,\plus,\comma,\period,\mathslash,\mathcolon,%
\semicolon,\less,\equal,\greater,\backslash,\rbrack,\lbrack,\atsign,\vert,\lbrace,%
\rbrace,\times,\div}]{Minion Pro}
Best Answer
Just break your
\setmainfont
into two lines, and you should have separate control over Greek and Latin. E.g., to get Latin in italics and upright Greek:(Reverse the options if you want upright Latin and italic Greek.)
Or maybe I just didn't understand what you were trying to do.