0

I wanted to put the subscript below and above the box (shown in image), similar to how it happens for \sum. \displaystyle is not applicable. How can I make it placed there?

enter image description here

Here is my definition of the box:

\documentclass[12pt]{report}
\usepackage{amsmath,amsthm,amssymb,setspace}
\usepackage{scalerel}
\def\mcirc{\mathbin{\scalerel*{\bigcirc}{t}}}
\def\msquare{\mathord{\scalebox{1}[1]{\scalerel*{\Box}{\strut}}}}

\begin{document} $\msquare_{i=1}^{k} C_{n_i}$ \end{document|

yo han
  • 3
  • 1
    What about \underset, \overset and/or \overunderset as mentioned here? – Lukas Jun 22 '22 at 09:12
  • 1
    Welcome. // Please make it a habit in this place to embed your example in complete enough code, which we can copy and run. Latex is complex and powerful, and oftentimes the first few code lines are important. – MS-SPO Jun 22 '22 at 09:18
  • Replace \mathord with \mathop – egreg Jun 22 '22 at 10:12

1 Answers1

1

Simply replace \mathord with \mathop. Of course, the limits will be above and below only in display style.

\documentclass[12pt]{report}
\usepackage{amsmath,amsthm,amssymb,setspace}
\usepackage{scalerel}

\newcommand\mcirc{\mathbin{\scalerel{\bigcirc}{t}}} \newcommand\msquare{\mathop{\scalerel{\Box}{\strut}}}

\begin{document}

[ \msquare_{i=1}^{k} C_{n_i} \mcirc X ] \begin{center} $\msquare_{i=1}^{k} C_{n_i} \mcirc X$ \end{center}

\end{document}

enter image description here

But I'm not sure you want the same size in display and text style. Anyway, I removed the useless \scalebox.

egreg
  • 1,121,712