11

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

egreg
  • 1,121,712
user64742
  • 343
  • 4
    You need \{ \}. This post here http://tex.stackexchange.com/questions/55246/how-to-properly-typeset-all-forms-of-punctuation-used-in-english-language-docume/55911#55911 here has more information on what needs a slash. – dustin Jul 08 '13 at 04:18
  • @dustin: While very complete otherwise, it doesn't mention curly braces. – T. Verron Jul 08 '13 at 05:08
  • @T.Verron scroll up two answers – dustin Jul 08 '13 at 05:32
  • @dustin I don't think it's a duplicate; this is not about punctuation, but about math symbols. There may be an overlap, not sufficient to declare this as a duplicate. – egreg Jul 08 '13 at 14:56
  • @egreg that is true but that post informs the user how to use these symbols correctly. – dustin Jul 08 '13 at 18:13
  • It seems that at least on some versions of Firefox, you'll need to use \\\{ and \\\}. – goodvibration Jun 04 '19 at 15:52

1 Answers1

15

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.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

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

\end{document}

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.

Adam Liter
  • 12,567
  • 3
    A possible improvement would be \{\,|f(z)|:|z-z_{0}|=R\,\} with thin spaces near the braces. Using amsmath's \lvert and \rvert instead of | is recommended practice. – egreg Jul 08 '13 at 09:03
  • Thanks for the suggested improvements, @egreg. See my updated answer. – Adam Liter Jul 08 '13 at 13:12