I'm a LaTeX neophyte, so please excuse my ignorance.
I want to typeset a document with text in Cambria and math in Cambria Math. I found the unicode-math package, which seems to do what I want.
Here is a simple sample:
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{Cambria}
\setmathfont{Cambria Math}
\begin{document}
The Bezier curve $C$ of degree $m$ is
$$C(u) = \sum_{i=0}^m f_i(u)P_i$$
\end{document}
The math is coming out as plain (upright) Cambria.
Any idea what might be going wrong ??
[Elaboration]: I'm using MikTeX 2.9, and XeLateX. I updated the XeTeX version because unicode-math told me to. I'm just choosing an option from the TeXworks menu. I don't know what's happening behind the scenes (and I hope I don't need to know).
Here is some log file output that might be relevant:
Requested font "Cambria/ICU:script=latn;language=DFLT;" at 10.0pt
-> C:/Windows/Fonts/CAMBRIA.TTC
Requested font "Cambria Math/ICU" at 10.0pt
-> C:/Windows/Fonts/CAMBRIA.TTC
\g_fontspec_family_Cambria Math_int=\count125
Requested font "Cambria Math/B/ICU" at 10.0pt
-> C:/Windows/Fonts/CAMBRIA.TTC
.................................................
. fontspec info: "no-font-shape"
.
. Could not resolve font Cambria Math/B (it probably doesn't exist).
.................................................
. fontspec info: "defining-font"
.
. Font family 'CambriaMath(0)' created for font 'Cambria Math' with options
. [BoldItalicFont={},ItalicFont={},Script=Math,SizeFeatures={{Size=10-},{Size=7
-10,Font=Cambria
. Math,Style=MathScript},{Size=-7,Font=Cambria
. Math,Style=MathScriptScript}},].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <10->"Cambria Math/ICU:script=math;language=DFLT;"<7-10>"Cambria
. Math/ICU:script=math;language=DFLT;+ssty=0;"<-7>"Cambria
. Math/ICU:script=math;language=DFLT;+ssty=1;"
$$ .. $$
, see Why is\[ … \]
preferable to$$
?\XeTeXtracingfonts=1
to your document and compile on the command line with the option--output-driver="xdvipdfmx -vv"
. Put the log-file somewhere for download and show (copy&paste) the messages of xdvipdfmx in the terminal.xdvipdfmx
. It would also be a good idea if you could put the pdf somewhere for download.