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.

When I do this:

\begin{equation}
 b_i =
\begin{cases}
arg \min_{\forall p \in B} d(a_i, p) & \text{if } d(a_i, b_i) < D_{max}
\\
\text{undefined} & \text{otherwise}
\end{cases}
\end{equation}

the _ doesn't cause the following text to go below \min, but rather appear as a subscript. Is it possible to make a \min expression with the following text below it inside a cases environment?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

does adding \displaystyle do it for you? id est:

\begin{equation}
    b_i =
    \begin{cases}
    arg \displaystyle\min_{\forall p \in B} d(a_i, p) & \text{if } d(a_i, b_i) < D_{max}
    \\
    \text{undefined} & \text{otherwise}
    \end{cases}
\end{equation}
share|improve this answer
    
Yes, it does. I didn't think I needed \displaystyle since I was already in an 'equation' environment, but I guess 'cases' takes it "out" of equation mode. Thanks! –  David Doria Mar 17 '12 at 16:36
3  
@DavidDoria i think you can use the dcases environment instead of cases if you don't want it in text style, as described here –  asia1281 Mar 17 '12 at 16:42
    
cases switches one size down, which means \displaystyle->\textstyle. In \textstyle, all sub/super-sripts are put on the left. –  tohecz Mar 17 '12 at 16:43
add comment

You can use commands \limits and \nolimits to control where the subscripts are places. As well, you might want the arg min look better, as shown in the following example (notice you have to declare the command \argmin yourself):

\documentclass{article}

\usepackage{amsmath,mathtools}

%% HERE
\DeclareMathOperator*{\argmin}{arg\,min}

\begin{document}

\begin{equation}
 b_i =
\begin{cases}
%% HERE
\argmin\limits_{\forall p \in B} d(a_i, p) & \text{if } d(a_i, b_i) < D_{max}
\\
\text{undefined} & \text{otherwise}
\end{cases}
\end{equation}

\end{document}

You can omit the \limits command if you use dcases environment instead of cases. They differ in the math style inside -- dcases keep \displaystyle inside.

share|improve this answer
    
You might also point to the dcases environment provided by mathtools. –  egreg Mar 17 '12 at 16:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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