2

Output

\[
 x^\lambda_p = \begin{dcases*}
        1  & if \lambda  is assigned to P\\
        0  & $Otherwise$
        \end{dcases*}
\]
1
  • 3
    Next time, maybe try to think of a more descriptive question title :). Mar 28 at 22:24
8

Be sure to use $ in the right places (but not in the wrong places):

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
 x^\lambda_p = \begin{dcases*}
        1  & if $\lambda$ is assigned to $p$ \\
        0  & otherwise
        \end{dcases*}
\]
\end{document}

produces

enter image description here

A general tip: if words are set in italics and spaces are being ignored, chances are you're in math mode when you don't want to be.

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.