Simplifying, \begin{foo}
does four things:
- check that the environment
foo
(more exactly the macro \foo
) exists;
- open a group (
\begingroup
);
- set the name of the current environment (
\@currenvir
) to foo
;
- execute
\foo
(actually \csname foo\endcsname
).
Similarly, \end{foo}
does
- execute
\endfoo
(more exactly \csname endfoo\endcsname
);
- check that the environment being closed is the same one which was opened before (by comparing
foo
with the previously saved \@currenvir
);
- close the group (
\endgroup
).
The standard classes, the KoMa
classes, and memoir
all define abstract
as environment. In this case, just calling \abstract{...}
(I tested only with article
) gives no errors but the result will be puzzling: with the article
class the font size and the margins are reduced, and without \end{abstract}
this extends to the following text. This happens because the steps 1 to 3 are skipped, in particular \begingroup
; and since there is no \end{abstract}
the group (which was never opened) won't be closed, and whatever font and/or margin and/or whatever changes \abstract
does won't be limited to the abstract.
There are classes (mostly journals, I guess; I can mention webofc.cls
and PoS.cls
, because I had to use them) which define \abstract
as a macro taking one argument. Writing
\begin{abstract}
Some text.
\end{abstract}
will often also produce no errors, but again the result won't be the intended output: only the letter S
will be taken as argument of \abstract
(whatever it does), the rest ("ome text.
") will be typeset somehow, and \end{abstract}
will probably raise no error, because even if \endabstract
hasn't been defined, the construction \csname...\endcsname
will expand to \relax
.
So back to your question:
In particular, is there any advantage or disadvantage of using one over the other?
The bottom line is: it has nothing to do with advantage or disadvantage: You must use \begin{abstract}...\end{abstract}
if the class defines the abstract as environment, and \abstract{...}
if the class defines the abstract as macro.
abstract
as environment, but I've seen some journal template defining it as macro with one argument.\foo
and\end{foo}
so typically\abstract
is like\begin{abstract}
with no close, and not a good idea.\abstract
should be avoided?\abstract{...}
, which then confuses users when they come to a class that useabstract
as an environment (symptoms are wondering why their margins are so large).\abstract
to be used as a command with an argument, some as an environment (in which if you use the command form it will do the wrong thing)and some do not define it at all. By default it is not defined, and you have not said which class you are using.....