# Using numcases in eqnarray

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.

• Welcome to TeX.SE. Please complete your code, beginning with \documentclass and ending with \end{document}. – Ross Sep 3 '18 at 5:19
• 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 3 '18 at 7:20

## 1 Answer

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}