Consider this MWE (lualatex):
\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\begin{document}
$\colonsim :\sim$
$\colondash :\!\!-$
\end{document}
which results in:
The colons of the mathtools commands are raised. I've looked into the macro definitions and I think this is because their definition uses the \vcentcolon macro which is similar to \mathrel {\mathop :}. I am not very well versed in the math group details, but I am assuming this is some deeper TeX magic to raise the colon slightly.
Without unicode-math, the situation is reversed. By commenting out the unicode-math package import, we get this:
Which demonstrates the purpose this definition of mathtool serves in the non-unicode math world.
However, since with unicode-math and opentype fonts colons are already centered (I am assuming?), this raising is now superfluous and actually makes it worse.
It also seems that it can very simply be remedied by just constructing one's own colonsim or colondash as I've done in the MWE.
In conclusion, I just wanted to let you guys now that this problem exists and suggest that it might be beneficial to overwrite these macros with simple equivalents such as :\sim for \colonsim, or to document this in the user manual.
Consider this MWE (lualatex):
which results in:
The colons of the mathtools commands are raised. I've looked into the macro definitions and I think this is because their definition uses the
\vcentcolonmacro which is similar to\mathrel {\mathop :}. I am not very well versed in the math group details, but I am assuming this is some deeper TeX magic to raise the colon slightly.Without unicode-math, the situation is reversed. By commenting out the unicode-math package import, we get this:
Which demonstrates the purpose this definition of mathtool serves in the non-unicode math world.
However, since with unicode-math and opentype fonts colons are already centered (I am assuming?), this raising is now superfluous and actually makes it worse.
It also seems that it can very simply be remedied by just constructing one's own colonsim or colondash as I've done in the MWE.
In conclusion, I just wanted to let you guys now that this problem exists and suggest that it might be beneficial to overwrite these macros with simple equivalents such as
:\simfor \colonsim, or to document this in the user manual.