# unicode-math and amsmath incompatible

When I compile the following mwe with xelatex, I am told:

ERROR: LaTeX Error: Command \dddot already defined.

--- TeX said ---
Or name \end... illegal, see p.192 of the manual.

l.571    \hbox{\normalfont ...}\vss}}}}


(That's line 571 of amsmath.sty).

\documentclass{minimal}
\usepackage{fontspec}
\setmainfont{LinLibertine_R.otf}
\usepackage{unicode-math}
\setmathfont{STIXGeneral}
\usepackage{amsmath}

\begin{document}

Hello, world.

\end{document}


Is there a bug, or am I doing something wrong?

That allows compilation, but the braces are minuscule (the first one is supposed to span Ordinarium/Extraordinarium). Here's the longer example.

\documentclass{minimal}
\usepackage{mathtools}
\usepackage{unicode-math}
\setmainfont {LinLibertine_R.otf}
\setmathfont{STIXGeneral}

\begin{document}

$\begin{tabular}{c} Somnium\\ proprie\\ dictum \end{tabular} \left\{\begin{array}{@{}l@{}} \text{Ordinarium} \left\{\begin{array}{@{}l@{}} \begin{tabular}{@{}l@{}} Vulgare seu commune\\ physicum ortum\\ ex principiis \end{tabular} \left\{\begin{tabular}{@{}l@{}} Externis\\[3\jot] Internis \end{tabular}\right.\\[6\jot] \text{Proprium aliquibus.}\\ \text{Præsagiens} \end{array}\right.\\[12\jot] \text{Extraordinarium} \left\{\begin{array}{@{}l@{}} \begin{tabular}{@{}l@{}} θεῖον diuinum\\ θεόπεμπτον immissum à Deo \end{tabular} \left\{\begin{tabular}{@{}l@{}} Mediate per\\ bonos angelos\\[3\jot] Immediate \end{tabular}\right.\\[6\jot] \text{Diabolicum}\\ \text{Δαιμονιόπεμπτον} \end{array}\right. \end{array}\right.$

\end{document}

-
Load amsmath before unicode-math. And this one in place of fontspec (which will be automatically loaded). –  egreg Apr 16 '12 at 20:46
For reference, see chapter 3 of the unicode-math manual. –  Torbjørn T. Apr 16 '12 at 21:59
That allows compilation, but the braces are minuscule (the first one is supposed to span Ordinarium/Extraordinarium). –  George Pigman Apr 16 '12 at 23:50
@GeorgePigman: This is because STIXGeneral is not an OpenType Math font, either try XITS Math or the new STIX Math (though the later has some issues, last time I checked). –  Khaled Hosny Apr 17 '12 at 3:15
XITS Math works, but what is the name of the new STIX Math? STIXVariants, STIXNonUnicode, and STIXSize*Sym don't work. –  George Pigman Apr 17 '12 at 10:56
show 1 more comment

Here's what I get with the following modifications to your input:

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\setmainfont {Linux Libertine O}
\setmathfont{XITS Math}

\begin{document}

$\begin{tabular}{c} Somnium\\ proprie\\ dictum \end{tabular} \left\{\begin{array}{@{}l@{}} \text{Ordinarium} \left\{\begin{array}{@{}l@{}} \begin{tabular}{@{}l@{}} Vulgare seu commune\\ physicum ortum\\ ex principiis \end{tabular} \left\{\begin{tabular}{@{}l@{}} Externis\\[3\jot] Internis \end{tabular}\right.\\[6\jot] \text{Proprium aliquibus.}\\ \text{Præsagiens} \end{array}\right.\\[12\jot] \text{Extraordinarium} \left\{\begin{array}{@{}l@{}} \begin{tabular}{@{}l@{}} θεῖον diuinum\\ θεόπεμπτον immissum à Deo \end{tabular} \left\{\begin{tabular}{@{}l@{}} Mediate per\\ bonos angelos\\[3\jot] Immediate \end{tabular}\right.\\[6\jot] \text{Diabolicum}\\ \text{Δαιμονιόπεμπτον} \end{array}\right. \end{array}\right.$

\end{document}


-