[Tex/LaTex] Physics replacement effort

package-writingphysics

I'm currently considering writing up some macros in order to provide a somewhat more reasonable alternative to what the physics package does. This is heavily inspired by Alternatives to the physics package.

The problem is: Which kind of macros should be implemented? I don't want to add questionable syntax like the package does, but more reasonable things with proper LaTeX typical optional arguments or even some more unconventional but still (imho) reasonable things, e.g. _ starting an optional argument for something that should be subscript and right delimited by either a ^ (starting a superscript) or the next mandatory argument.

Everyone is encouraged to wish for macros I should implement. If somebody has a finished solution for something that should be in the package — and the person is willing to share it — one can post those solutions as answers as well.

So what can a single answer to this question contain? A wish for a macro (optionally along with syntax proposals) or a macro-implementation (which might be subject to further discussions). Please only one per answer. You might upvote implementations or macro-wishes you deem a good idea to be in such a package.

Edit: So far the packages braket and diffcoeff were brought to my attention, which seem to provide macros for subsets of the physics package's functionality.

Best Answer

Recently I took the effort of migrating my master thesis from using the physics package to its alternatives and my own macros.

Allow me to sum up my thoughts on the matter:

  1. There should be no drop-in replacement for the physics package per se. This package is hell on Earth and it's the LaTeX equivalent to systemd. It tries to do so much without being good at anything.

  2. On that note, LaTeX packages should follow the UNIX and KISS principles, they should do one thing and do it well. IMO, the new physics package should be broken down into several non-overlapping packages:

    • derivatives (which is already well covered by diffcoeff)
    • Dirac notation (which is already well covered by braket)
    • matrices (which is already covered by amsmath)
    • vector and vector operations (can be done manually but it would be nice to have a package with dedicated useful macros)
    • quick quad text in math mode with common macros for if,iff,c.c.,ow (to be done)
    • useful math functions defined by physics and not present in other common packages (to be done)
    • automatic bracket resizing, i.e. physics' \qty (to be done)
Related Question