Assume foo
is some environment; with
\begin{foo}
LaTeX does some bookkeping, opens a group and expands the macro
\foo
With
\end{foo}
some check are performed, \endfoo
is expanded and the group is closed.
In the case of theorem
, we can test
\show\theorem
\show\endtheorem
which gives
> \theorem=macro:
->\@thm {\let \thm@swap \@gobble \th@plain }{theorem}{Theorem}.
> \endtheorem=macro:
->\endtrivlist \@endpefalse .
It may seem that \endtheorem
is no big deal; but let's see what \endtrivlist
means:
> \endtrivlist=macro:
->\if@inlabel \leavevmode \global \@inlabelfalse \fi \if@newlist
\@noitemerr \global \@newlistfalse \fi \ifhmode \unskip \par \else
\@inmatherr {\end {\@currenvir }}\fi \if@noparlist \else \ifdim
\lastskip >\z@ \@tempskipa \lastskip \vskip -\lastskip \advance
\@tempskipa \parskip \advance \@tempskipa -\@outerparskip \vskip
\@tempskipa \fi \@endparenv \fi .
So you're missing several things if you omit \end{theorem}
.
Perhaps, in the case of theorem
not much is missed, but only getting "similar" output doesn't guarantee that, maybe some pages later, something goes awry. The most striking aspect in the particular case is that the vertical spacing after the statement will be wrong, even if you leave an empty line after the closing brace.
This practice is definitely not recommendable: some environments do the bulk of their work exactly at \end...
; others do almost nothing at that stage. One should know in depth what every environment does.
Finally, the {\theorem ...}
syntax is clumsy.
\begin{theorem}...\end{theorem}
LaTeX way of writing a theorem while{\theorem ...}
TeX way of writing a theorem?\center,\centering
and\begin{center}...\end{center}
. See for example tex.stackexchange.com/questions/2651/…\remark{...}
was changed to italic. (he didn't use braces to isolate the theorem input.) all latex documentation says that theorems are to be input as environments, not commands, so clearly, the instructions weren't being followed. egreg's answer gives good reasons why one should follow the instructions.