17

When using the packages unicode-math and mathtools, I always get warnings

Package unicode-math Warning: Using \overbracket and \underbracket from
(unicode-math)                `mathtools' package.
(unicode-math)                 
(unicode-math)                 Use \Uoverbracket and \Uunderbracket for
(unicode-math)                original `unicode-math' definition.


Package unicode-math Warning: I'm going to overwrite the following commands
(unicode-math)                from the `mathtools' package: 
(unicode-math)                 
(unicode-math)                     \dblcolon, \coloneqq, \Coloneqq, \eqqcolon.
(unicode-math)                
(unicode-math)                 
(unicode-math)                 Note that since I won't overwrite the other
(unicode-math)                colon-like commands, using them will lead to
(unicode-math)                inconsistencies.

(and sometimes a few more of the same kind). In the documentation for unicode-math, Sec. 6.1, I find

This package can produce a number of informational messages to try and inform the user when something might be going wrong due to package conflicts or some- thing else. As an experimental feature, these can be turn off on an individual ba- sis with the package option warnings-off which takes a comma-separated list of warnings to suppress.

However the only warning that is mentioned by name is mathtools-colon:

This warning could be suppressed by loading the package as follows:

\usepackage[warnings-off={mathtools-colon}]{unicode-math}

How can I suppress all warnings of unicode-math regarding mathtools?

4
  • 7
    Looking at the unicode-math code there is only a further warning mathtool-overbracket, so \usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} should work. But it's indeed a bit disappointing that no easier way is available.
    – campa
    Nov 12, 2020 at 10:19
  • @campa Please write that as an answer because it is the correct solution!
    – Adam
    Feb 25, 2021 at 2:43
  • @Adam Uh, I had completely forgotten about this. I was actually hoping that some unicode-math expert would slip in and answer properly, but all right, I'll write one, be it only to take the question from the "Unanswered" list.
    – campa
    Feb 25, 2021 at 11:51
  • @campa Your comment solved my problem and as it helped me, I merely suggested that because I thought you would have forgotten it and it would be a shame such a helpful tip to go unnoticed. Cheers! :)
    – Adam
    Feb 25, 2021 at 15:05

1 Answer 1

15

As far as I can see the unicode-math documentation does not state explicitly which warnings are predefined. Searching the code for the string mathtools one finds the lines

\msg_new:nnn { unicode-math } { mathtools-overbracket } {
  Using~ \token_to_str:N \overbracket\ and~
         \token_to_str:N \underbracket\ from~
 `mathtools'~ package.\\
  \\
  Use~ \token_to_str:N \Uoverbracket\ and~
       \token_to_str:N \Uunderbracket\ for~
       original~ `unicode-math'~ definition.
}
\msg_new:nnn { unicode-math } { mathtools-colon } {
  I'm~ going~ to~ overwrite~ the~ following~ commands~ from~
  the~ `mathtools'~ package: \\ \\
  \ \ \ \ \token_to_str:N \dblcolon,~
  \token_to_str:N \coloneqq,~
  \token_to_str:N \Coloneqq,~
  \token_to_str:N \eqqcolon. \\ \\
  Note~ that~ since~ I~ won't~ overwrite~ the~ other~ colon-like~
  commands,~ using~ them~ will~ lead~ to~ inconsistencies.
}

so the mathtools-related warnings are mathtools-overbracket and mathtools-colon. To deactivate them load the package as

\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}

You must log in to answer this question.