# {cases} argument not running, rather says fraction has an extra '}'?

What is wrong with this piece of code in Latex?

$$\begin{displaystyle} C =\begin{cases} \frac{4}{3}, &(\text{for color singlet configuration}) \\ -\frac{1}{6}, &(\text{for color octet configuration}) \end{cases} \end{displaystyle}$$


The compiler shows this error:

How should I correct this?

• you have omitted the amsmath package (most likely) but what is the intention of \begin{displaystyle} here \displaystyle isn't needed and is never intended as an environment) – David Carlisle Jul 15 '17 at 10:08
• Works fine for me in a MWE. Are you loading amsmath? Btw: You shouldn't use \begin{displaystyle}, use $ instead. – Ulrike Fischer Jul 15 '17 at 10:08 ## 1 Answer You get this error from \documentclass{article} %\usepackage{amsmath} \begin{document} \begin{displaystyle} C =\begin{cases} \frac{4}{3}, &(\text{for color singlet configuration}) \\ -\frac{1}{6}, &(\text{for color octet configuration}) \end{cases} \end{displaystyle} \end{document}  But the markup should be \documentclass{article} \usepackage{amsmath} \begin{document} \[ C =\begin{cases} \frac{4}{3}, &(\text{for color singlet configuration}) \\ -\frac{1}{6}, &(\text{for color octet configuration}) \end{cases}$
\end{document}

• I would probably add a \phantom{-} before the first \frac. – Ulrike Fischer Jul 15 '17 at 10:14
• Writing \hfill before the first \frac works too. :-) – Mico Jul 15 '17 at 10:22