-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xelatex + unicode-math breaks over/underbrackets #29
Comments
It's not |
According to this, there might be a way to redefine over/underbracket macros so there's compatibility (since unicode-math does have its own argument-free over/underbracket) latex3/unicode-math#544 - and once upon a time it seems to have worked by preserving and redefining mathtools' brackets: latex3/unicode-math@872775e |
In the meantime, here's a solution that works (via this)! Store mathtools' brackets as separate commands, then restore them after \documentclass{article}
\usepackage{mathtools}
% Save mathtools' brackets
\let\normalunderbracket=\underbracket
\let\normaloverbracket=\overbracket
\usepackage{unicode-math}
\begin{document}
% Restore mathtools' brackets *after* \begin{document}
\let\underbracket=\normalunderbracket
\let\overbracket=\normaloverbracket
Default options:
$$
\underbracket[0.25pt][1pt]{A}_{\text{Some text}} = \overbracket[1pt][3pt]{\pi r^2}^{\text{More text}}
$$
Custom options:
$$
\underbracket[0.25pt][10pt]{A}_{\text{Some text}} = \overbracket[1pt][8pt]{\pi r^2}^{\text{More text}}
$$
\end{document} |
\@ifpackageloaded{unicode-math}{
\let\underbrace\LaTeXunderbrace
\let\overbrace\LaTeXoverbrace
}{} |
@zepinglee doesn't |
When using mathools v1.25 (2021/03/18) with xelatex (TeX Live 2021) and unicode-math, underbrackets and overbrackets fail to render correctly if thickness/height arguments are provided:
Everything works fine if unicode-math is omitted:
It seems like unicode-math might be providing its own underbracket and overbracket that are overriding mathtools' brackets?
The text was updated successfully, but these errors were encountered: