TransWikia.com

Space between characters for summation cases condition

TeX - LaTeX Asked on July 6, 2021

I am using the following code for summation with cases:

$sigma(x) = begin{cases}
    1 if sum_{k=1}^{n} x_{k} > theta and i = 0
    0, textit{otherwise}
end{cases}$

However for this code, there are no spaces between the characters when the LaTeX code is compiled. How do I insert space between the characters?

Thanks!

One Answer

Use & to separate the state from its explanation, and use text to denote text mode.

$sigma(x) = begin{cases}
    1 & text{if $sum_{k=1}^{n} x_{k} > theta$ and $i = 0$}
    0 & text{otherwise}
end{cases}$

Syntactically, if $sum_{k=1}^{n} x_{k} > theta$ and $i = 0$ is a sentence, albeit a sentence that contains two formulas.

Correct answer by Mico on July 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP