I think that the LaTeX Pascal style "preamble", forcing certain stuff to be entered before the \begin{document}, must be changed. The problem arises when one wants to join several documents together, say in a journal. On the level of implementation, the command \document that \begin{document} executes cancels the \begingroup that \begin{...} always executes. However, when I worked on the "environments with hooks", I discovered one cannot allow for an environment which does not have this \begingroup ... \endgroup locality, because it will screw up the local variables needed in order how keep track of how the environments stack up. -- So, in particular, these more advanced environments structures do not work with the old "document" environment (which really isn't an environment, but only faked to make it look like one to the user). On the semantic level, if one should be able to stack up programs in libraries, this Pascal idea of LaTeX seems wrong. Instead one should go with the style of languages such as C++ and Java, which does not have it. So this idea of LaTeX with a preamble seems simply wrong from the semantic point of view. I think it should be changed somehow, so that one can add environments above the "document" level. Hans Aberg