So I've seen there's an \abstract{...}
command (through TeXlipse's suggestions), however most examples I find online use an environment structure like this:
\begin{abstract}
something like \lipsum or \blindtext
\end{abstract}
Since I would assume \abstract{...}
functions like \section{...}
, that got me wondering. Is there any difference between these two options? In particular, is there any advantage or disadvantage of using one over the other?
Best Answer
Simplifying,
\begin{foo}
does four things:foo
(more exactly the macro\foo
) exists;\begingroup
);\@currenvir
) tofoo
;\foo
(actually\csname foo\endcsname
).Similarly,
\end{foo}
does\endfoo
(more exactly\csname endfoo\endcsname
);foo
with the previously saved\@currenvir
);\endgroup
).The standard classes, the
KoMa
classes, andmemoir
all defineabstract
as environment. In this case, just calling\abstract{...}
(I tested only witharticle
) gives no errors but the result will be puzzling: with thearticle
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
andPoS.cls
, because I had to use them) which define\abstract
as a macro taking one argument. Writingwill 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:
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.