# How to use limits and nolimits together?

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?

-

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}
-
Well, it works too. Thank you. –  Popopo Apr 1 '13 at 2:55
${\prod_{\mathclap{x \in X}}}^{B}$