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

When I try to compile a latex file, I get the following error:

LaTeX Error: Environment table undefined.

I think the line that is causing the problem is: \begin{table}

Does anybody know how I can fix this?

share|improve this question

migrated from stackoverflow.com Mar 27 '13 at 6:19

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.SE. For future reference you should compose a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem. Otherwise those trying to help can only guess at what the exact problem is. – Peter Grill Mar 27 '13 at 6:27
It could be that you're using a document class that doesn't define tables (for example, the letter class). – Nicola Talbot Mar 27 '13 at 10:33
up vote 4 down vote accepted

You are most likely missing the document class declaration. Remember that the content of your document must be surrounded by

<content here>

You are of course free to use a different document class, but you need one such declaration.

share|improve this answer
Wow, that is amazing mind reading ability. :-) However, when I remove the \documentclass, the error I get is The font size command \normalsize is not defined, not Environment table undefined. – Peter Grill Mar 27 '13 at 6:26
See here. – Lars Kotthoff Mar 27 '13 at 8:34
Yeah that is what I am saying. I get a different error than Environment table undefined which is what your solution seems to be addressing. – Peter Grill Mar 27 '13 at 8:47
These errors should both be fixed by adding the document class command. – Lars Kotthoff Mar 27 '13 at 8:55
@LarsKotthoff ITYM "... adding the correct document class command. (not all classes define the table environment.) – wasteofspace Mar 27 '13 at 10:32

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.