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!
This is great! I don't want to admit to the nasty things I've done in the past to hack my way through aligning things in different rows using mathpartir.