Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 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
add comment

Your Answer


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