# How to put indices under argmin (using _ is not sufficient) [duplicate]

Possible Duplicate:
Command for argmin or argmax?

How to put indices under "argmin" in: \operatorname{argmin}_{z} ?

For the sum we can do something like: \sum\limits_{z}, but it does not work for the argmin example.

EDIT MWE:

$$\label{myequation} F = \begin{cases} n + b + 1 & \text{if a \neq \emptyset}\\ \tilde{z} = \operatornamewithlimits{argmin}_{\tilde{z}}\operatorname{dist}(z, \tilde{z}) & \text{otherwise} \end{cases}$$

-
@egreg this does not work, I need z under argmin as a limit ! Also, I have the formula inside a $$...$$ bloc, and it seems that I can not put [ \operatornamewithlimits{argmin}_z ] inside this bloc ! –  user995434 Jul 8 '12 at 16:21
Please, look at the linked question. Defining \DeclareMathOperator*{\argmin}{argmin} and using \argmin in the body of the document is the best strategy. In your case the limits are not put under "argmin" because cases typesets its lines in textstyle. Load mathtools and use its dcases environment. –  egreg Jul 8 '12 at 16:30
@user995434 -- you need to insert \displaystyle before the \operatornamewithlimits'. the cases environment is based on matrix, which assumes \textstyle by default. this isn't very well documented, so i'll add a note to improve the situation the next time the documentation is updated. –  barbara beeton Jul 8 '12 at 16:41

## marked as duplicate by egreg, barbara beeton, cmhughes, tohecz, Joseph Wright♦Jul 8 '12 at 20:33

use

\documentclass{article}
\usepackage{amsmath}
\begin{document}

$$\operatornamewithlimits{argmin}_z= \ldots$$

$$\label{myequation} F = \begin{cases} n + b + 1 & \text{if a \neq \emptyset}\\ \tilde{z} = \operatornamewithlimits{argmin}\limits_{\tilde{z}}\operatorname{dist}(z, \tilde{z}) & \text{otherwise} \end{cases}$$
\end{document}

-
The long command name has been obsolete for some years; indeed it's in amsopn just for back compatibility: \def\operatornamewithlimits{\operatorname*} –  egreg Jul 8 '12 at 15:36
I know that! The macro name \operatornamewithlimits is selfexplanatory, but \operatorname* not ... –  Herbert Jul 8 '12 at 15:41
Maybe, but it's undocumented. –  egreg Jul 8 '12 at 15:42
@egreg -- niggle: if you check texdoc amsopn, \operatornamewithlimits is documented (and said to be retained "for the time being" for backwards compatibility), but operatorname* is not, except in the cited definition. (of course, the number of people who actually read the amsopn-specific documentation probably approaches zero.) –  barbara beeton Jul 8 '12 at 15:56
@barbarabeeton The *-variant is in amsldoc.pdf`, of course. Not that many people read this one, either. :( –  egreg Jul 8 '12 at 15:58