I want to write (in math mode) \binom{a}{b}
with square brackets [
I know that {a\brack b}
exists for this, but somehow it doesn't work with me. Is there another way to generate what I want?
The \binom
command is defined by amsmath
with
\newcommand{\binom}[2]{\genfrac{(}{)}{0pt}{}{#1}{#2}}
(not really like this but it's essentially equivalent).
I wouldn't redefine \binom
, but rather \stirling
:
\newcommand{\stirling}[2]{\genfrac{[}{]}{0pt}{}{#1}{#2}}
The third argument is the fraction line thickness, the first two are the required delimiters; the fourth argument can be used to force a math style, say
\newcommand{\dstirling}[2]{\genfrac{[}{]}{0pt}{0}{#1}{#2}}
in analogy with \dfrac
.
\renewcommand{\atopwithdelims}[2]{{\genfrac{[}{]}{0pt}{}{#1}{#2}}_F}
. After deleting this, all worked fine.