Skip to content

colons in some mathtools commands are raised vertically above center #651

@jcasc

Description

@jcasc

Consider this MWE (lualatex):

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}

\begin{document}
$\colonsim :\sim$
$\colondash :\!\!-$
\end{document}

which results in:

Image

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:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions