It seems the physics package adds an extra (thin) space after \dd{x}, before my punctuation (usually "," or ".") and I don't want this. This is a common scenario for me, especially if I'm displaying a calculation that ends in an integral. It seems that I can get around this by sticking the punctuation into the \dd command, like so: \dd{x.}. I've used a regex to replace this in my document, but is there a way to get physics get this right automatically? This is probably the only feature of the physics package that I use, and while googling, I saw that a Henri Menke said in a comment
Do not use the physics package. The implementation is really horrible and it destroys the spacing all over the place.
...so if there is a good way to automatically have thin spaces at the correct places without the physics package, I'm all game.
A simple MWE so you can see what I mean (I don't usually punctuate inside inline math mode)
\documentclass{article}
\usepackage{physics}
\begin{document}
$A \dd{s}.$
\[ B \dd{s}.\]
$C \dd{s.}$
\[ D \dd{s.}\]
\end{document}
\newcommand{\dd}{\mathop{}\!\mathrm{d}}(I'd prefer without the\mathrm, but the document is yours). Whether you type\dd sor\dd{s}it doesn't matter. Thephysicspackage is full of dubious constructions. – egreg Sep 14 '19 at 09:19\mathop, gave this exact solution - https://tex.stackexchange.com/questions/84302/what-is-the-difference-of-mathop-operatorname-and-declaremathoperator If this counts as a duplicate then close away, otherwise in the near future I will summarise the relevant information into an answer... – Calvin Khor Sep 14 '19 at 12:08