I'd modify the \env@matrix
command, on which all the matrix constructions are built;
\documentclass{article}
\usepackage{amsmath,bm}
\usepackage{setspace}
\usepackage{lipsum} % just for this example
\makeatletter
\def\env@matrix{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\linespread{1}\selectfont
\renewcommand{\arraystretch}{1.2}%
\array{*\c@MaxMatrixCols c}}
\makeatother
\doublespacing
\begin{document}
\lipsum*[2]
\begin{equation}
\mathbf{H} =
-\bm{\mu} \cdot \mathbf{B} =
- \gamma B_o \mathbf{S}_z = -\frac{\gamma B_o\hbar}{2}
\begin{bmatrix} 1&0\\0&-1 \end{bmatrix}.
\end{equation}
\lipsum[3]
\end{document}
Try also without \renewcommand{\arraystretch}{1.2}
, that I added in order to space out a bit the rows, which seems better with \doublespacing
.
Actually, it's difficult to improve something using \doublespacing
, which destroys any attempt at good typography.
In what does this differ from Mico's and Herbert's methods?
Mico's workaround works only within equation
. Herbert's instead applies single spacing to all display environments, so also to align
, for instance, reducing the line spacing between aligned equations.
This might be desirable or not, it depends on you.
Note that {\bf H}
should not be used, preferring \mathbf{H}
. Also, you'll have noticed that {\bf \mu}
doesn't embolden the mu; use \bm{\mu}
and load the bm
package as in my code.
setspace
command or\linespread
for increasing the leading. Can you confirm? By the way, avoid{\bf H}
that should be\mathbf{H}
.