Suppose I have the following simple matrix, constructed in the usual way using bmatrix
:
Anal-retentive editor asks if the spacing between the delimiter and the adjacent column can be increased for "aesthetic reasons". Say, perhaps yielding something like the following:
While there are a number of ways to increase spacing among rows/columns in a matrix, as much as I could find these always apply to rows with regard to other rows, columns with regard to other columns. I wasn't able to suss out how you can tweak spacing between matrix elements and the delimiters.
I came up with a kludge in the following MWE (which yielded the embedded images, above), but for MS with lots of matrices you might want to tweak this way, doing this 'by hand' spacing tweak is laborious, and offends the sense I work with that some clever person has a better, more general (and flexible) way. I had a quick dive into nicematrix
(didn't see anything obvious), and thought about reverting to an array
approach, but in the end, figured I'd see what other folks might recommend.
Thanks in advance for suggestions. [Coding suggestions only. Suggestion concerning editorial aesthetics? Well...]
\documentclass[11pt,letterpaper,oneside]{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
Here is an example matrix:
\[
\begin{bmatrix*}[r]
1 & 2 & 1 \\
0 & -2 & -3 \\
0 & 3 & -2
\end{bmatrix*}
\]
Seeking a way to increase the separation between the left
delimiter and elements of the first column, and the right
delimiter from the right-most column The following is a
total blunt-weapon kludge.
\[
\begin{bmatrix*}[r]
\ 1 & 2 & 1 \ \\
\ 0 & -2 & -3 \ \\
\ 0 & 3 & -2 \
\end{bmatrix*}
\]
Kludge works, but is there a better way?
[In other words, a particular package of `setting' I can
tweak so that it auto-magically applies to bmatrix constructs?].
\end{document}