TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write

\binom nk=^nC_k=\frac{n!}{k!(n-k)!}

but when compiled the n is a little far away from the P and C for my liking. Is there a command to write this? I know there is a \binom so I was hopeful. If not, is there a way to force the n to be closer?

$ ^nP_k=\frac{n!}{(n-k}!} - permutation \\  
\binom nk=^nC_k=\frac{n!}{k!(n-k)!} - combination $  
share|improve this question
up vote 9 down vote accepted

You could use the \prescript command from the mathtools package and define two commands; something along the following lines:




\Myperm{k} = \frac{n!}{(n-k)!}\quad
\Mycomb{k} = \frac{n!}{k!(n-k)!}\quad
\Myperm[m]{k} = \frac{m!}{(m-k)!}\quad
\Mycomb[m]{k} = \frac{m!}{k!(m-k)!}


enter image description here

share|improve this answer
It's not on topic, I've just noticed \qquad a few times and wondered what it is? – DannyBland Apr 6 '13 at 0:55
@DannyBland \qquad introduces (both in text and in math mode) a space equal to twice \quad. – Gonzalo Medina Apr 6 '13 at 0:57
If you want to write \Myperm{x}{y} instead of \Myperm[x]{y} (different brackets) and are okay not having n as the default first parameter, remove[n] from both the \newcommand lines. – Gordon Gustafson Sep 4 '14 at 20:01

You can define your own:

enter image description here




$\Perm{n}{k}=\frac{n!}{(n-k)!}$ - permutation 

$\binom nk=\Comb{n}{k}=\frac{n!}{k!(n-k)!}$ - combination  
share|improve this answer

I provide a generic \permcomb macro that will be used to setup \perm and \comb.

The spacing is between the prescript and the following character is kerned with the help of \mkern.

The default kerning between the prescript and P is -3mu, and -1mu with C, which can be changed by using the optional argument of all three macros.






enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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