Sometimes I want to put an array
inside of a mathpartir inferrule
.
The straightforward thing doesn't work:
\begin{equation*}
\inferrule{Conclusion}{
Premiss 1 \and
\begin{array}{ll}
1 & 2 \\ % note, this is where the problem happens
3 & 4
\end{array}
}
\end{equation*}
The problem is that \\
is defined by inferrule
in an incompatible way from array
.
Fortunately, the \\
inside an array env is just an alias for \@arraycr
(see documentation for the array
package (PDF)).
So we just need the following in the preamble:
\makeatletter % allow us to mention @-commands
\def\arcr{\@arraycr}
\makeatother
...
\begin{document}
\begin{equation*}
\inferrule{Conclusion}{
Premiss 1 \and
\begin{array}{ll}
1 & 2 \arcr
3 & 4
\end{array}
}
\end{equation*}
\end{document}
That's all!
another solution indicated by the manual is to wrap the whole array in braces
{ \begin{array} ... \end{array}}