9

Is there a simple way to obtain a right aligned first column in the cases environment. As far as I can see, mathtools does not add such an option.

(This question might be read as a request for enhancement on mathtools... :) )

1 Answer 1

16

The mathtools package actually provides this extension as a feature already! Cases can be created using the following syntax:

\newcases{<case name>}{<space>}{%
  <left col align>}{<right col align>}{<left delim>}{<right delim>}

The regular dcases case is defined in the following way:

\newcases{dcases}{\quad}{%
  $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}

Consequently, you would probably be interested in:

\makeatletter
\newcases{mycases}{\quad}{%
  \hfil$\m@th\displaystyle{##}$}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
\makeatother

Modified cases

4
  • Ah! This is not in the docs... Commented Sep 5, 2011 at 6:20
  • Remember to add \makeatletter before and \makeatother after using this. I've updated my answer to include this.
    – Werner
    Commented Sep 5, 2011 at 6:23
  • 2
    Since it require some knowledge to use, it is only used internally. Suggest a good name for it, and I might add it
    – daleif
    Commented Sep 5, 2011 at 8:41
  • @daleif: so did you add it?
    – adn
    Commented Dec 30, 2011 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .