Philipp Stephani wrote:
2011/8/24 Arno Trautmann<[email protected]>:
Hi all,
the following document fails because unicode-math overwrites the definition
of mathtools:
\documentclass{minimal}
\usepackage{mathtools}
\usepackage{unicode-math}
\setmathfont{XITS-math}
\begin{document}
\[\underbracket{abc}\]
\[\underbracket[7pt]{abc}\]
\end{document}
\underbracket works, but the optional arguments are gone. I tried to use
\let to restore the definition of mathtools after loading unicode-math, but
did not succeed. Is this fixable or incompatible in principle?
It is unfortunately incompatible in principle.
aaww :(
Unicode-math uses
LuaTeX's \Udelimiterunder to place a special stretchable character
under the expression, while mathtools uses a form of vector graphics.
Because the shape of the underbracket character is determined by the
font in the unicode-math case, the options to set the rule thickness
and bracket height cannot possibly work.
For me this is a name clash: both definitions are useful, and possibly
unicode-math should not use the names used by mathtools. Bug is here:
https://github.com/wspr/unicode-math/issues/215
You can restore the definition by saying:
\usepackage{mathtools}
\let\savedunderbracket
Just for completeness, I assume you mean
\let\savedunderbracket\underbracket
\usepackage{unicode-math}
...
\begin{document}
% Unicode table is executed at begin document
\let\underbracket\savedunderbracket
cheers
Arno