3

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?

4

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}
  • 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 – aeroNotAuto 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. – yo' Mar 17 '12 at 16:43
5

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.

  • You might also point to the dcases environment provided by mathtools. – egreg Mar 17 '12 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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