I need to write something below and top of ampersand sign. I want it to be like \sum
. I have tried
\&_{i = 0}^{n}
but it shows i=0
in the index but not below ampersand sign.
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 community\documentclass{report}
\DeclareMathOperator*{\amper}{\&}
\begin{document}
Inline: $\amper_{i=1}^n$
Inline with display: $\amper\limits_{i=1}^n$
Display: \[ \amper_{i=1}^n \]
\end{document}
If you wanted the ampersand to display larger in display style, you can use scalerel
package to grow the size to match the vertical extent of the \sum
sign.
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\foo}{\scalerel*{\&}{\sum}}
\usepackage{scalerel}
\begin{document}
\[ \foo_{i=3}^{6}(f^2(i)) \]
\centering This is inline: \(\foo_{i=3}^{6}(f^2(i)) \)
\end{document}