7

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?

3
  • Actually, my problem is solved. I'm using someone else's tex file and they are defining \renewcommand{\atopwithdelims}[2]{{\genfrac{[}{]}{0pt}{}{#1}{#2}}_F}. After deleting this, all worked fine.
    – mathse
    Feb 14, 2015 at 13:54
  • 3
    Don't redefine primitives.
    – egreg
    Feb 14, 2015 at 13:56
  • But I didn't do it :)
    – mathse
    Feb 14, 2015 at 13:56

1 Answer 1

9

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.

1
  • Thanks for your answer. This will probably solve it (though my problem is already solved, see my comment above).
    – mathse
    Feb 14, 2015 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.