# Is the document an example of an environment?

Is the document in which you write your code an example of an environment? It seems like it might be, because it requires \begin and \end statements, but I have never seen a source which defines whether or not it is an environment. If it is not an environment, what is it?

• Yes, it is. However, it's a special one since no code put after \end{document} is executed. – yo' Jun 27 '16 at 14:57
• If you define an environment as something starting with \begin{<string>} and ending with \end{<string>}, then document is an environment. – egreg Jun 27 '16 at 14:58