# Text within curly braces (mathjax).

Hi: I was defining a set with curly braces and put some words in between. For instance: {f: for all x, f < x}. If I enclose all between dollar signs (ds) the text will be poorly legible. Let's leave the ds's and place one immediately preceding the text and another immediately following. Then I get "unbalanced braces". I just don't know how to use mathjax to write an expression as in the example above. Unless latex has a way to include text within ds's. Can you help me? Anyways, why has mathjax to complain about an unbalanced brace? Can't he leave it as is?

• Try using \text{}. Mar 20 '20 at 20:16
• Your "unbalanced braces" are probably due to having put only one in each of the two MathJax expressions. The curly brace is a signifier of scope in $\LaTeX$, so you get an error when they are unmatched. To get the literal curly brace character within a MathJax expression, you will need to "escape" them, \{ and \}. See the MathJax Basic Tutorial and Quick Reference, Item 6 on Parentheses. Mar 21 '20 at 13:42

$\{f: \text{ for all } x, f < x\}$
$$\{f: \text{ for all } x, f < x\}$$
• Else: $\{f: \forall x, f< x\}$ which renders $\{ f: \forall x, f< x\}$ Mar 20 '20 at 20:40
• Also stf91, pay close attention to quid's formatting: For any brace (curly bracket) to render in mathjax, you need immediately precede them with a backslash, with no space in between the backslash and the curly bracket. ${x}$ renders as: ${x}$, but $\{ x \}$ renders as $\{x\}$. Mar 21 '20 at 10:07
• Similarly, to format $\$$or$\%$in mathjax, one needs to precede those symbols with a backslash. So if you want to format say "After a discount of$40\%$, an item originally priced at$\$50$ will only cost you $\$30$." You'd format including $40\%$, $\$50$, and $\$30\$. Mar 21 '20 at 10:13