In some case limits and nolimits need to be used together, e.g. an expression \prod\nolimits^{B}\limits_{x \in X}, in which B is in the right-upper corner and x \in X under the \prod, is not displayed it should be, B is displayed above the \prod, not in the right-upper corner. How to resolve this?
Asked
Active
Viewed 5,928 times
8
Popopo
- 831
2 Answers
12
The amsmath package provides \sideset:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\sideset{}{^{B}}\prod_{x \in X}A_{x}
\]
\end{document}

You may want to define your own command:
\newcommand{\prodB}{\sideset{}{^{B}}\prod}
egreg
- 1,121,712
6

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
{\prod_{\mathclap{x \in X}}}^{B}
\]
\end{document}
David Carlisle
- 757,742
\mathclapmay give undesirable spacing when the subscript is large. – Aditya Mar 31 '13 at 18:58\smashoperator{\prod_{x \in X}}instead of thatmathclap. – Manuel Mar 31 '13 at 19:57