Redefining cases command

Yes. Use alignat and empheq(needless to load amsmath in this case):

\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage{empheq}

\begin{document}

\begin{empheq}[left=\empheqlbrace]{alignat*=2}
  a & = c, &\qquad x&=1,\\
  b + b’ & = d + d’, & x&=2.
\end{empheq}

\end{document} 

Note you need 3&. More generally, for n groups of alignment, you need 2n–1 ampersands: one is for the new group (from the 2nd group), the next for the alignment point inside the group.

enter image description here


You can simply use your own definition as a new environment.

\documentclass{article}
\begin{document}

\newenvironment{mycases}%
  {\left\{
   \begin{array}{@{}r@{\;}lr@{}}
  }%
  {\end{array}
   \right.
  }

\(\begin{mycases} 
     a & = c & x=1\\ 
     b & = d & x=2
  \end{mycases}
\)
\end{document}

enter image description here


Yes, just modify suitably the definition of cases:

\documentclass{article}
\usepackage{amsmath,array}

\makeatletter
\newenvironment{mycases}{%
  \let\@ifnextchar\new@ifnextchar
  \left\lbrace
  \def\arraystretch{1.2}%
  \array{@{}r@{}>{{}}l@{\quad}l@{}}%
}{%
  \endarray\right.%
}
\makeatother

\begin{document}

\[
\begin{mycases} 
a+a^2 & = c & x=1\\ 
b & = d-d^2 & x=2
\end{mycases}
\]

\end{document}

enter image description here

Tags:

Cases