I am adding puntuctuation to my equations such as
\documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} abc. \end{align} \begin{align} \left(abc\right). \end{align} % Update: Here, the spacing between the parentheses is ok: \begin{align} \left(abc\right)\left(def\right) \end{align} And here, the spacing between the parentheses is ok, but the final spacing before the dot is not \begin{align} \left(abc\right)\left(def\right). \end{align} Intended result is similar to: \begin{align} \left(abc\right)\left(def\right)\!. \end{align} \end{document} Clearly, in the generated PDF, the spacing in the two equations above is uneven: There is more space after \right) than simply abc:
How can I automatically fix this spacing? I know I could manually insert \! before the dot, but that gets tedious and I might miss some instances. Also, it is not enough to simply redefine \right) to leave out the space because if it appears inside an equation it should be kept. I want to keep this space.


\left/\rightin this case is the spacing that you don't want. So a larger question would be if you really need this in the first place, and if so, what is it you are enclosing. You can often get a better result manually sizing the fences.{align*}is an equation, so your example is inside an equation. Could you explain that a bit?\left(abc\right)to begin with? It does nothing else than adding the unwanted space.\left/\rightis in an equation that matters, it's that you want the space to be there unless it precedes a comma. Regarding everyone saying you shouldn't use\left/\rightin this example and you saying you have other macros: could you give us an example where you think\left/\rightis necessary?