[Tex/LaTex] Quick question about curly braces not showing up


Ii am writing a short code, so I doubt anything else in the code is causing the problem. This is the problematic line of code:

\[ M_R := \max {|f(z)|: |z - z_0| = R }\le M\]

It doesn't show the curly braces. I've tried using \left{ and \right} but to no avail.

What should I do?

Thank you

Best Answer

The following are all considered special printing characters in LaTeX: # $ % & ~ _ ^ \ { and }. That is, they all tell LaTeX to do something; they're part of the language or syntax of LaTeX. In order to actually print any of these characters in the output, you have to "escape" the character. This is done by putting a \ in front of the character. (There are a few exceptions to this. One is the character \, which you can print in the output with the command \textbackslash, since \\ is a command used for line breaking in LaTeX. The other two exceptions are ^ and ~, which can both be used for appending diacritic marks to letters, such as \^{o} and \~{a}, for example. You can print these in the output by \^{} and \~{}, respectively, though see this post for more considerations about typesetting the tilde.)

Update: As @egreg points out in the comments, using thin spaces (\,) and \lvert and \rvert from the amsmath package are best practices for typesetting mathematics. Here is an updated MWE that uses both thin spaces and \lvert and \rvert. The accompanying picture will allow you to compare the differences.




\[ M_R := \max \{\,\lvert f(z)\rvert:\lvert z-z_{0}\rvert=R\,\}\le M\]


enter image description here

As far as I can tell, at least in this case, there is no discernible differences between | and \lvert and \rvert. The reason that using the latter two is considered a best practice is because they are delimiters.