Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@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 8 '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 8 '12 at 16:30
1  
@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
add comment

1 Answer 1

up vote 1 down vote accepted

use

\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} 
share|improve this answer
    
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
1  
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
1  
@barbarabeeton The *-variant is in amsldoc.pdf, of course. Not that many people read this one, either. :( –  egreg Jul 8 '12 at 15:58
show 4 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.