So I'm trying to make my own command to make matrices less painful
My current command is:
\newcommand{\mat}[2]{
\left(\begin{array}{#1}{#2}\end{array}\right)}
with the intention to use it as:
\mat{cc}{1&0\\0&1}
producing the same thing as
\left(
\begin{array}{cc}
1 & 0 \\
0 & 1
\end{array}\right)
But I keep getting the message "Missing } inserted." I think it doesn't like the \\ in the command argument.
Any suggestions?
Edit: Fixed it. Removed the brace group from the macro

tabstackenginepackage. It does this already. Either\tabularCenterstackor\parenMatrixstackshould do the trick. See http://tex.stackexchange.com/questions/139771/writing-a-table-with-equally-spaced-columns-based-on-the-widest-column/139946#139946, and http://tex.stackexchange.com/questions/148669/can-i-tab-inside-of-align-environment/148684#148684 – Steven B. Segletes Mar 05 '14 at 02:07#2in a brace group. (And welcome to TeX.SX!) I don't think\\likes being in a brace group. – Sean Allred Mar 05 '14 at 02:34\matrixcommand? – Werner Mar 05 '14 at 17:07