# Latex would not set because it fall over things like \begin{document} and other thing [closed]

I can't set my latex document. it stuck at l.22 \begin{document}. When i type H in the type area under the controle output, it says:

I suspect you have forgotten a }, causing me to read past it when you wanted me to stop. I'll try to recover; but if the error is serious, you'd better type 'E'or 'X' now and fix your file.

I don't know what i can do, because I can not find a missing } somewhere.

Most time i type R, it will run trough it and than the next time it would not stop. But a next time it will.

Most of the time when it does not stop at line 22 it will, later on, at line 126 then it says something like \newpa or something like that. And sometimes not there but than at a other line.

Welcome to TeX.SE. IT is difficult to help you without more information. It would be best if you composed a fully compilable MWE including \documentclass and the appropriate packages that shows this error message. But, please try to reduce the size of the MWE -- remove any packages and sections of code that are not necessary to reproduce the problem. –  Peter Grill Dec 25 '12 at 17:04
Its not as simple as counting the {, }, unless you count them very carefully. For instance does you counting account for \{, which should not be counted. Also, there are other things to consider such as the opening { and closing } can not have alignment points (i.e., tabular, array, align, etc) in between, or you can't open an { in the start of an custom environment and close at the end of the environment definition. –  Peter Grill Dec 25 '12 at 18:03