unicode-math icon indicating copy to clipboard operation
unicode-math copied to clipboard

`mathtools` and `\coloneq`

Open marcin-serwin opened this issue 2 years ago • 6 comments

Description

The mathtools package defines \coloneq as :-, while the unicode-math defines it as :=. The same problem also applies to \Coloneq. This should be either mentioned in the mathtools warning or changed so that the naming is the same.

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\setmathfont{STIXTwoMath-Regular.otf}

\begin{document}
\[
  a \coloneq b \Coloneq c
\]
\end{document}

Further details

With unicode-math image Without unicode-math image

marcin-serwin avatar Jun 15 '22 14:06 marcin-serwin

mathtools has the =versions using qq it just documents the commands as coming from txfonts but

\documentclass{article}

\usepackage{newtxmath}

\begin{document}
\[
  a \coloneq b \Coloneq c
\]
\[
  a \coloneqq b \Coloneqq c
\]
\end{document}

image

with three =and one -??

the older txfonts package matches mathtools

image

and as you say unicode-math only defines the single q versions as =.

Given the command name, unicode-math seems most reasonable, but whether we can overcome compatibility issues to get there I am not sure.

thanks for the report...

davidcarlisle avatar Jun 15 '22 16:06 davidcarlisle

Unless I have missed It don't think Unicode has a :- character,

:= is U+ 2254

-: is U+2239

::= is U+2A74

davidcarlisle avatar Jun 15 '22 17:06 davidcarlisle

I haven't found it either.

marcin-serwin avatar Jun 15 '22 17:06 marcin-serwin

@marcin-serwin newtxmath documents

https://mirror.apps.cam.ac.uk/pub/tex-archive/fonts/newtx/doc/newtxdoc.pdf

\coloneq and \eqcolon now point to the correct glyphs;

so I think the :- form was an error in txfonts copied into mathtools and (half) corrected in newtxmath but correct in unicode-math

davidcarlisle avatar Jun 15 '22 17:06 davidcarlisle

So I guess it's just a matter of adding \coloneq and \Coloneq to the commands listed in the warning produced when mathtools is loaded.

marcin-serwin avatar Jun 15 '22 17:06 marcin-serwin

I will raise issues at mathtools and newtxmath, will need to decide whether to document or fix the incompatibility

davidcarlisle avatar Jun 15 '22 17:06 davidcarlisle