TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(FYI I am new to LaTeX)

I'm trying to compile a TeX document that someone else has given me. I had BasicTex installed, and it didn't seem to work. My friend said he uses TeX Live, so I tried installing that but I get the same error after typing pdftex document.tex:

! Undefined control sequence.
l.1 \documentclass

I'm guessing that means the distribution I have installed does not support this tag, is that right? How can I find out which distribution I should install?

share|improve this question
Use pdflatex document.tex not pdftex. – Ulrike Fischer May 24 '12 at 14:55
I just wanted to note that BasicTeX is TeXLive. – morbusg May 24 '12 at 19:19
Since you are new to LaTeX, you should read the FAQ. – Martin Schröder May 28 '12 at 13:57
up vote 14 down vote accepted

Your document is a LaTeX document, not plain TeX. Use the pdflatex command on it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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