At 18:57 +0000 2000/01/13, James Kilfiger wrote: >> the problem with this and perhaps the problem with the whole mechanism >>is that >> a lot of people have learned to write environments like this: >> >> \newenvironment{foo}{...\quote ...}{ ... \endquote ...} >> >> ie without using \begin/\end internally. >> >> if all such things like \quote internally use \EndThisEnviornment then guess >> what happens. so this needs some thoughts. >> >> a) do not allow above usage > >I don't know how verbatim environments will be implemented in latex3, >but the verbatim package requires this short hand. One posiblity that >comes to mind is that there should be a class writer's version of \begin >and end (\BeginEnvironment ?) that do not set the current environment, >and could perhaps be used with verbatim and other unusual things. I think that I already implemented (while implementing "environments with hooks") what is asked for in this discussion: In the example above, the environment "quote" would merely execute something like \quote/begin (resp \quote/end) when calling \begin{quote} (resp \end{quote}). However, I also kept track of the name "quote" in an extra variable. Thus, when it is time to end an environment, one merely needs to end the environment on the top of the internal variable stack. This allows for commands such as \EndEnvironment, or whatever you want to name it. Thus, the version \newenvironment{foo}{...\begin{quote} ...}{ ... \EndEnvironment ...} \newenvironment{foo}{...\quote/begin ...}{ ... \EndEnvironment ...} would be legal. Or one could have a command \end[quote], with the quote legal. The trick in the implementation is to keep track of both the defining environment ("foo" above), and the currently executing environment (which will be "quote" above, when that is executing). Hans Aberg