6

Can someone explain me this following strange bahavior?

The code is

\documentclass{amsart}

\newcommand{\pippo}{Pippo}
\begin{document}
\begin{pippo}  
\end{pippo}
\end{document} 

The output is

Pippo   
  • 3
    Related: http://tex.stackexchange.com/questions/311118/what-happens-if-you-use-a-command-form-of-an-environment – egreg Nov 06 '16 at 16:28

1 Answers1

7

\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.

David Carlisle
  • 757,742