The error is coming up even when the \newcommand 's (and \QQ 's) are removed. I'm very new to LaTeX so simple explanations would be really appreciated. Thanks!

  • 3
    Welcome! Never post screen shots of codes. And there are for instance several \in outside a math environment, so the error is understandable. Also the definitions of \CC and so on can be traded for loading amsfonts or dsfont, which provide the commands \mathbb or \mathds, respectively.
    – user194703
    May 4 '20 at 2:00
  • Not relevant but this question is from Principles of Mathematical Analysis by Rudin May 4 '20 at 2:00
  • Oh I see. Thanks Schrodinger's cat! (cool name) I'll edit the post by removing the image and adding the code as text. May 4 '20 at 2:04
  • 1
    @Schrödinger'scat amssymb (already loaded) loads amsfonts provides \mathbb (just an observation)
    – Au101
    May 4 '20 at 2:04
  • 2
    To be clear: it is not sufficient to pair $ signs, you also need to make sure to use math commands such as \in are in math mode. @Au101 Good catch!
    – user194703
    May 4 '20 at 2:06

The problem is that you have the \in outside of the math environment. Check the following MWE and how the second one produces your error while the first doesn't.


  \newcommand{\CC}{\textsf{C\kern-1ex C}}

  This will not produce error $r \in \CC$.
  While this $r$ \in \CC will.
  • Isn't precisely the content of the comment?
    – user194703
    May 4 '20 at 2:06
  • It is, just showing how to solve it with code.
    – adn
    May 4 '20 at 2:06
  • why are you defining CC with a negative kerrn rather than using \mathbb{X} ? May 4 '20 at 7:11
  • I'm just using the original definition.
    – adn
    May 4 '20 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.