[Tex/LaTex] Overrunning superscript in product written in “Pi notation”

math-modespacing

How do you deal with the problem of an overrunning superscript in a product written in Pi notation? E.g.

enter image description here

In this case it seems that the extra space before and after the Pi is unnecessary, so maybe it could be omitted?

Another solution I guess is naming the expression using a variable and use the variable name as the superscript.

\documentclass{article}
\begin{document}
\[
  N_A!\prod_{k=1}^{(N_A-N_B)/2} (2k - 1)
\]
\end{document}

Best Answer

Not sure it looks better, but to answer the direct question, the space of the superscript can be ignored with \mathclap of the mathtools package.

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
  N_A!\prod_{k=1}^{\mathclap{(N_A-N_B)/2}} (2k - 1)
\]
\end{document}

enter image description here

Related Question