4

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}
1
  • What about using \frac{}{} instead of / notation for quotient?
    – Sigur
    Nov 28, 2017 at 23:09

2 Answers 2

4

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

4

The mathtools package also provides the \smashoperator macro:

enter image description here

You may ask what the practical difference is between this solution and the \mathclap-based approach that Steven Segletes used in his answer. Observe that the lower bound of the \prod macro -- k=1 -- is ever so slightly wider than the product symbol above it. Because the \mathclap directive affects only the upper limit of multiplication, there's a wee bit more whitespace on either side of the \prod symbol in Steven's answer than in mine.

Of course, one really has to know what to look for in order to notice this difference in the first place.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .