0

I defined the following command

\newcommand{\bigast}{\mathop{\Huge \mathlarger{\mathlarger{*}}}}

Unfortunately, its vertical alignment is a bit too high

enter image description here

I tried fixing it with \raisebox{} but couldn't make it work. Any ideas how to correct its vertical alignment?

Thanks for any help!

Zest
  • 319
  • At the very least this code will give a warning about \Huge being invalid in math mode. Please post a complete code. – campa Aug 04 '21 at 19:07

1 Answers1

2

From How are big operators defined?, this makes the \ast occupy the same vertical footprint as \sum, which we know is well behaved.

I show two implementations, one that retains the \textstyle size always, and the other that grows in \displaystyle.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\DeclareMathOperator*{\foo}{\scalerel*{\ast}{\sum}}
\DeclareMathOperator*{\barr}{\scalerel*{\ast}{\textstyle\sum}}
\usepackage{scalerel}

\begin{document} [ \foo_{i=3}^{6}(f^2(i)) ]

This is inline: (\foo_{i=3}^{6}(f^2(i)) )

[ \barr_{i=3}^{6}(f^2(i)) ]

This is inline: (\barr_{i=3}^{6}(f^2(i)) ) \end{document}

enter image description here