I want to have a primed product symbol, i.e. something like
$\prod^\prime$
but it puts the prime on top of the product symbol instead of next to it (as a superscript, as it usually works). Does anyone know how to do this?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI want to have a primed product symbol, i.e. something like
$\prod^\prime$
but it puts the prime on top of the product symbol instead of next to it (as a superscript, as it usually works). Does anyone know how to do this?
The amsmath
package has a \sideset
command for this purpose:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\sideset{}{'}\prod_{n=-k}^k \frac{a_n}{n}
\end{equation*}
\end{document}
The general syntax is
\sideset{_a^b}{_c^d}\sum
producing
and works on any large operator \prod
, \sum
, etc.
You have to detach the superscript from the operator. Below I've inserted a \vphantom
that is the size of \prod
:
\documentclass{article}
\begin{document}
\[
\prod_{i=0}^n f_i \quad \prod{\vphantom\prod}'
\]
\end{document}