I want to define a new command to format \mathbb{E} in the same way as \sum - same size in display/inline formulae, and same treatment of sub/superscripts. The following seems to work...
\newcommand*{\bbe}{%
\ifinner
\mathbb{E}%
\else
\mathop{\displaystyle\vcenter{\hbox{\huge$\mathbb{E}$}}}%
\fi
}
...except that in display formulae, when inside automatically sized brackets (e.g. \left( \bbe_x \right)) it reverts to treating it as if it were in an inline formula (so smaller size, subscripts to the right not beneath).
I'm not sure what's causing this issue; any advice would be greatly appreciated!
