The wileysix
class redefines \@array
in a small but decisive detail:
LaTeX kernel definition
\def\@array[#1]#2{%
\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
\bgroup
\setbox\@arstrutbox\hbox{%
\vrule \@height\arraystretch\ht\strutbox
\@depth\arraystretch \dp\strutbox
\@width\z@}%
\@mkpream{#2}%
\edef\@preamble{%
\ialign \noexpand\@halignto
\bgroup \@arstrut \@preamble \tabskip\z@skip \cr}%
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
\let\tabularnewline\\%
\let\par\@empty
\let\@sharp##%
\set@typeset@protect
\lineskip\z@skip\baselineskip\z@skip
\ifhmode \@preamerr\z@ \@@par\fi
\@preamble}
wileysix.cls
definition
\def\@array[#1]#2{%
\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
\bgroup
\setbox\@arstrutbox\hbox{%
\vrule \@height\arraystretch\ht\strutbox
\@depth\arraystretch \dp\strutbox
\@width\z@}%
\@mkpream{@{}#2@{}}%
\edef\@preamble{%
\ialign \noexpand\@halignto
\bgroup \@arstrut \@preamble \tabskip\z@skip \cr}%
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
\let\tabularnewline\\%
\let\par\@empty
\let\@sharp##%
\set@typeset@protect
\lineskip\z@skip\baselineskip\z@skip
\ifhmode \@preamerr\z@ \@@par\fi
\@preamble}
The difference is in the line
\@mkpream{#2}%
that becomes
\@mkpream{@{}#2@{}}%
so that no padding is added at the left and right of an array
. On the other hand, amsmath
manually fixes the padding in matrices, by adding a negative space between the fences and the matrix:
\renewenvironment{matrix}{%
\matrix@check\matrix\env@matrix
}{%
\endarray \hskip -\arraycolsep
}
\def\env@matrix{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols c}}
\renewenvironment{pmatrix}{%
\left(%
\matrix@check\pmatrix\env@matrix
}{
\endmatrix\right)%
}
The \hskip -\arraycolsep
are exactly the negative spaces I was talking about. The one on the right has its effect, because the standard preamble of a matrix
is specified and the last column is not reached until the matrix has \MaxMatrixCols
columns.
I find the redefinition in the class very silly: it is done exactly for the same purpose of amsmath
, that is, not having a gap between the fences and the coefficients of the matrix. But the cure is worse than the disease.
I see no real problem in fixing the meaning of \@array
to be the kernel one. Just remember to manually add @{}
at either side of an array
column specification in cases you use the environment for special matrices with non standard center alignment.
\documentclass{wileysix}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@array}{\@mkpream{@{}#2@{}}}{\@mkpream{#2}}{}{}
\makeatother
\begin{document}
\[
\mathbf{y}=
\begin{pmatrix}
y_1 \\
y_2
\end{pmatrix}\mbox{ and }
\boldsymbol{\mu}=\begin{pmatrix}
\mu_1 \\
\mu_2
\end{pmatrix}
\]
\end{document}

\documentclass{article} \usepackage{mathtools}
so you must be using some class or package that redefines what is provided byamsmath
. we can't help if we don't know what you're using.wileysix
class redefines\@array
, which confusesamsmath
.\documentclass{wileySix}
From my naive scan through the class file, I can find very little dealing with mathematics (there is a macro for making symbols bold and something for equation numbering). However, it does only happen with this class.