Niko Gamulin - 1 year ago 134

LaTeX Question

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:

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

Answer Source

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

The tex file should have `\usepackage{amsmath}`

in the preamble.