I want to use the symbol gamma in the following document. But whenever i type \gamma , i get the error:

! Undefined control sequence.
l.7 hello my boy!!!!!!!! \X

The code is as follows:

\usepackage[a4paper, margin=1 in]{geometry}
hello my boy!!!!!!!! \X\gamma

Can anyone tell me how to fix this problem?

  • 4
    Put it in math mode: $\gamma$. – Michael Hardy Sep 11 '15 at 4:08
  • What is \X by the way? – Au101 Sep 11 '15 at 4:09
  • @Au101 i don't know, i googled it and i found that line for gamma, so tried it out, but didnt work – girl101 Sep 11 '15 at 4:10

The problem here is two-fold. Not only should \gamma be written using math-mode $\gamma$, but that \X is undefined.

enter image description here

Hello world! $\gamma$

How to interpret the error message style of TeX is obtained by reading Chapter 6: Running TeX (p 31) in the TeXbook:

! Undefined control sequence.
l.2 \vship

TeX begins its error messages with ‘!’, and it shows what it was reading at the time of the error by displaying two lines of context. The top line of the pair (in this case ‘\vship’ ) shows what TeX has looked at so far, and where it came from (‘l.2’, i.e., line number 2); the bottom line (in this case ‘1in’ ) shows what TeX has yet to read.

In your case, TeX's already read \X (the undefined control sequence), but not yet \gamma.





or whatever you want to call it.

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.