How can I subdivide in cases with square brackets?
I mean I want to write:
⌈ 2_i if ... rank (q, l) = | 2_i + 1 if ... ⌊ ....
with square brackets, not braces.
amsmathcasesdelimitersmath-mode
How can I subdivide in cases with square brackets?
I mean I want to write:
⌈ 2_i if ... rank (q, l) = | 2_i + 1 if ... ⌊ ....
with square brackets, not braces.
Best Answer
You could patch the
cases
environment, the way Thorsten showed or using theetoolbox
package and\patchcmd
. However, it could be better to preserve the originalcases
environment and to define a new one for that purpose. Here is a way, very similar to the original definition, but also using\lbrack
instead of\lbrace
, I calles the new environmentsqcases
:Though it looks a bit complicated, it's very straightforward: I took the original
cases
definition of amsmath.sty, wrotesqcases
instead and replaced\lbrace
by\lbrack
. I had to use\makeatletter
and\makeatother
because of the@
symbol in the originalamsmath
commands.For completeness, heres the way using patching:
After loading
etoolbox
, the respective internalamsmath
macro is changed to use\lbrack
instead of\lbrace
. It's a bit hazardous to patch internal commands, but it's a quick way and may even work after changes in amsmath while our new definition could become different tocases
then. At least it's good to know such methods.