5

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:

\begin{equation}
\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}
\end{equation}
David Carlisle
  • 757,742
  • @egreg this does not work, I need z under argmin as a limit !

    Also, I have the formula inside a \begin{equation} ... \end{equation} bloc, and it seems that I can not put [ \operatornamewithlimits{argmin}_z ] inside this bloc !

    – user995434 Jul 08 '12 at 16:21
  • 1
    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 08 '12 at 16:30
  • 1
    @user995434 -- you need to insert \displaystyle before the \operatornamewithlimits'. thecasesenvironment is based onmatrix, 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 08 '12 at 16:41

1 Answers1

3

Use \operatornamewithlimits{argmin}\limits_{\tilde{z}} to put a z tilda underneath the argmin. Full example:

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

\begin{equation} 
\operatornamewithlimits{argmin}_z= \ldots
\end{equation}

\begin{equation}
\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{equation}
\end{document} 
TeXnician
  • 33,589
  • 1
    The long command name has been obsolete for some years; indeed it's in amsopn just for back compatibility: \def\operatornamewithlimits{\operatorname*} – egreg Jul 08 '12 at 15:36
  • 1
    I know that! The macro name \operatornamewithlimits is selfexplanatory, but \operatorname* not ... –  Jul 08 '12 at 15:41
  • 1
    Maybe, but it's undocumented. – egreg Jul 08 '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 08 '12 at 15:56
  • 1
    @barbarabeeton The *-variant is in amsldoc.pdf, of course. Not that many people read this one, either. :( – egreg Jul 08 '12 at 15:58
  • I have a formula inside a \begin{equation} ... \end{equation} bloc, and it seems that I can not put \[ \operatornamewithlimits{argmin}_z \] inside this bloc ! – user995434 Jul 08 '12 at 16:14
  • @user995434: see edited answer –  Jul 08 '12 at 16:20
  • @Herbert your edited example works alone, but in my formula (see my edited question) it doesnt work, it have the same effect as: \operatorname – user995434 Jul 08 '12 at 16:26
  • @user995434: See my answer. You also need \limits when in math text style –  Jul 08 '12 at 16:31