I have the following minimal working example -- why does \def\bbm15
not work?? The error I get is
*File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
! Use of \bbm doesn't match its definition.
l.16 \bbm1
5 %this generates an error!
?
! Emergency stop.
l.16 \bbm1
5 %this generates an error!
End of file on the terminal!*
Minimum working example:
\documentclass{article}
\usepackage{mathtools}
\usepackage{amsmath,amsthm,amsfonts}
\def\bbm15{\renewcommand{\arraystretch}{1.5}\begin{bmatrix}}
\def\bbm20{\renewcommand{\arraystretch}{2.0}\begin{bmatrix}}
\def\ebm{\end{bmatrix}}
\begin{document}
\begin{equation}
X =
%\bbm20 %this works fine!
%\bbm15 %this generates an error!
\renewcommand{\arraystretch}{1.5}\begin{bmatrix} %this works fine!
X_{11} & X_{12} & \cdots & X_{1p} \\
X_{21} & X_{22} & \cdots & X_{2p} \\
\vdots & \vdots & \ddots & \cdots \\
X_{n1} & X_{n2} & \cdots & X_{np}
\ebm
.
\end{equation}
\end{document}