6

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
  • 1
    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
7

It is an environment by definition (as that's what the official latex manual calls it) however it does have one more or less unique property in that unlike any normal environment the content is not in a TeX group, this is for efficiency reasons and makes little observable difference as there can be no code after the environment that is executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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