# How to type specific things on the hat of expression?

I have problem typing this on the hat of max in the following example:

• See Typeset an = with an ! above. Depending on the context, $\max_{j=1}^{|B|} ...$ should suffice, since \max is an operator where the limits are set below/above when in display math. – Werner Apr 15 '13 at 20:31

For example

$\max_{j=1}^{|B|}$

Following egreg's suggestion, for math operators that are not defined by default, one can use \operatorname*{...}_{...}^{...}. Or, for typesetting math texts that are not math operators, you can also use the \overset (and \underset) command of the AMSmath package:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$\max_{j=1}^{|B|} \qquad \operatorname*{argmax}_{j=1}^{|B|}$

$\underset{j=1}{\overset{|B|}{math \; texts \; \mbox{and regular texts in math mode}}}$

\end{document}
• You can use \operatorname*{maximize}_{j=1}^{|B|} – egreg Apr 15 '13 at 22:47