1

We all know that \binom{n}{r} in math mode renders the binomial coefficient. For the purposes of a note, I am TeXing up, I am interested in designing a new math operator.

Suppose I called that operator as \bil{}{}, I would like the following input \bil{n}{r} to give <n,r>.

Can anyone please help me with how I would do that?

kan
  • 4,545

2 Answers2

5

How about

\newcommand\bil[2]{%
  \mathord{\left<#1,#2\right>}%
}
  • If I understand correctly, can we replace \left< by \langle. I think \langle looks good right? – kan Mar 30 '12 at 19:48
  • @KannappanSampath If you wish, but I believe \left< will come out as \langle. Do you see a difference (apart from the fact that \left< can grow)? – Stephan Lehmke Mar 30 '12 at 19:50
  • (Firstly, I agree with your code. It looks much better with \left< than with \langle.) – kan Mar 30 '12 at 20:05
3

Someting like this will work:

\documentclass{article}

\newcommand*{\bil}[2]{\ensuremath{\langle #1,#2\rangle}}

\begin{document}

Text Text \bil{4}{11} Text Text or \bil{m}{k} even $a=\bil{u}{r}$

\end{document}