I want to write conditional equations with one-sided curly brackets in Spaced Repetition software Mnemosyne. I have latex installed. I want an equation somewhat similar to the following

I want to write conditional equations with one-sided curly brackets in Spaced Repetition software Mnemosyne. I have latex installed. I want an equation somewhat similar to the following

if i read the instructions on this page (http://mnemosyne-proj.org/help/adding-media.php) correctly, here's what you'd input:
<$$>
f(x) =
\begin{cases}
x^2 - x, & \text{if $x \ge 1$}\\
0, & \text{otherwise}
\end{cases}
</$$>
whether this actually works depends on whether mnemosyne includes amsmath in its
complement of recognized packages. but if it does not, then it would not be unreasonable
to request the developers to add it. better yet would be to add mathtools which loads
amsmath, corrects some known bugs, and adds useful extensions.
I've found a solution on this page. Modifying it to my requirement, the following is the result in Mnemosyne:

and this is the code written to achieve that
<$$>
f(x) = \left\{ \begin{array}{ll}
\frac{x^2 -x}{2}, & \mbox{if $x \geq 1$};\\
0 ,& \mbox{otherwise}.\end{array} \right.
</$$>
{} button above the input box - it indents the whole region by 4 spaces on each line, which is interpreted by markdowan as input that should be formatted as code.
– Andrew Swann
Mar 13 '15 at 20:18
casesenvironment from the packageamsmath, as explained for instance here: http://tex.stackexchange.com/questions/9065/large-braces-for-specifying-values-of-variables-by-condition – yo' Mar 11 '15 at 12:05\documentclass{article}\usepackage{mathtools}\begin{document}\[f(x)=\begin{cases*}\frac{x^2-x}{x},&if $x\geq1$\\0,&otherwise\end{cases*}\]\end{document}– LaRiFaRi Mar 11 '15 at 12:40