How do I type piecewise functions in pages? Is it possible to use equation editor to write piecewise functions?

e.g.
You can enter the equations in pages using LaTeX and MathML with Insert -> Equation... or pressing ⌥ alt+⌘cmd+E.

It'll look like this:

|x| = \begin{cases}
 -x, &amp; \mbox{if } x &lt; 0 \\
 x,  &amp; \mbox{if } x \ge 0 
\end{cases}


This will produce:



Note: The easies way to get the LaTeX representation of the function is to insert it into builtin app called Grapher, right clicking on the function -> "Copy LaTeX Expression"