1

Can anyone show how to use eqnarray and numcases together? The example below works fine without numcases, but I would like to number the equations in the cases separately.

\documentclass[12pt]{article}
\usepackage{cases}

\begin{eqnarray}
f(x) &=& \Theta(x) \\
&=&\begin{cases}
1, & x > 0\\
 0 , & x < 0
\end{cases}
\end{eqnarray}

\end{document}

Thanks in advance.

Ross
  • 5,656
  • 2
  • 14
  • 38
  • Welcome to TeX.SE. Please complete your code, beginning with \documentclass and ending with \end{document}. – Ross Sep 03 '18 at 05:19
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please note that the use of eqnarray is deprecated. It is preferable to use amsmath package macros as equation for instance. Have a look at this post for more information – BambOo Sep 03 '18 at 07:20

1 Answers1

3

Very ad hoc solution:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
f(x) &= \Theta(x) \\
     &  \makebox[0pt][l]{\raisebox{-1.6ex}[0pt][0pt]{${}=\bigg\lbrace$}}
        \hspace{2.25em}\makebox[2em][l]{$1$,}  x > 0\\
     &  \hspace{2.25em}\makebox[2em][l]{$0$,}  x < 0
\end{align}

\end{document}

enter image description here

egreg
  • 1,121,712