josephwright / siunitx

A comprehensive (SI) units package for LaTeX
LaTeX Project Public License v1.3c
350 stars 25 forks source link

Physics warning #720

Closed AndrewMathas closed 3 months ago

AndrewMathas commented 5 months ago

I run a LaTeX course and one of my student's was very unhappy about the siunitx warning message:

Detected the "physics" package:
(siunitx)    omitting definition of \qty.
(siunitx)    
(siunitx)    If you want to use \qty with the siunitx definition,
(siunitx)    add 
(siunitx)    
(siunitx)    \AtBeginDocument{\RenewCommandCopy\qty\SI}
(siunitx)    
(siunitx)    to your preamble.

Of course, as I explained to him, this is harmless. Even so, I think that a better way to handle this would be to add a (boolean) package option that when set disables this warning and if the option is set to true, say, it adds \AtBeginDocument{\RenewCommandCopy\qty\SI}.

Sorry for being tedious -- and thanks for all of your work on siunitx and LaTeX in general!

josephwright commented 5 months ago

As mentioned in https://github.com/josephwright/siunitx/issues/447#issuecomment-1375670524, you can use

\ExplSyntaxOn
\msg_redirect_name:nnn{siunitx}{physics-pkg}{none}
\ExplSyntaxOn

to suppress the warning.

boyoungzheng commented 2 months ago

Another option is to use the package physics2 instead of physics.