Niko Gamulin Niko Gamulin - 3 months ago 21
LaTeX Question

How to display two-rows bracket in Latex?

Does anyone know how to modify the following string in order to display the two-lines bracket?

str = '$$c_i =\{\begin{array}{l l} 1 \quad L\left(Q_i\right) < 0 \\ 0 \quad L\left(Q_i\right) \geq 0 \\ \end{array}$$';


The current output is the following:

alt text

The sign '{' has to embrace both rows (1 and 0).

Answer
$$c_i =\begin{cases} 1 & L\left(Q_i\right) < 0 \\
                     0 &  L\left(Q_i\right) \geq 0
       \end{cases}$$

alt text

The tex file should have \usepackage{amsmath} in the preamble.