Can someone explain me this following strange bahavior?

The code is



The output is


\begin{foo} is essentially \begingroup\foo and \end{foo} is \endfoo\endgroup if \endfoo is defined, and just \endgroup otherwise. So it is usually possible to call a command as an environment.

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.