开发者

How to display two-rows bracket in Latex?

开发者 https://www.devze.com 2022-12-30 02:10 出处:网络
Does anyone know how to modify the following string in order to display the two-开发者_C百科lines bracket?

Does anyone know how to modify the following string in order to display the two-开发者_C百科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:

How to display two-rows bracket in Latex?

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


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

How to display two-rows bracket in Latex?

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


This is derived from Niall Murphy's answer, "tidied up" a bit:

\[
c_i =
\begin{cases} 
1 & L (Q_i) < 0 \\ 
0 & L (Q_i) \geq 0 
\end{cases}
\] 

Note that the "\" becomes "\\", and I've removed the \left and \right parenthesis modifiers, which introduce unwanted (I think) space between L and (.


Try add \left before \{ and \rigth. at the end.

It should look like

$$\alpha_t = \left \{ {{\sqrt{\frac1N},\; t = 0 } \atop {\sqrt{\frac2N},\; t \ne 0 } } \right.$$

or

$$ \left\{\begin{tabular}{l} \textbf{Y} = 0,299\textbf{R} + 0,587\textbf{G} + 0,114\textbf{B} \\ \textbf{Cb} = 128 + 0,5\textbf{R} - 0,418688\textbf{G} - 0,081312\textbf{B} \\ \textbf{Cr} = 128 - 0,168736\textbf{R} - 0,331264\textbf{G} - 0,53\textbf{B} \end{tabular} \right. $$

0

精彩评论

暂无评论...
验证码 换一张
取 消