db schrieb:
I have a LaTeX file intended as a submission to an Elsevier
journal, that compiles with a spurious error. A mini-example
is at www.dieterbritz.dk/err.zip. It calls on the file
elsarticle.cls, included. When I compile it with pdflatex,
I get the apparent error
! Missing } inserted.
<inserted text>
}
l.32 \end{frontmatter}
?
but when I persist, it compiles correctly. So this is
not an error. I can't submit the paper because the journal
will reject it as having an error, so I must fix this.
What is wrong here?
mini.tex has:
\abstract{...}
But with elsarticle.cls abstract is to be used as an environment:
\begin{abstract}...\end{abstract}
According to elsarticle.cls the environment "abstract" is defined as:
\newbox\absbox
\let\@elsarticleabstitle\@empty %*%
\def\abstracttitle#1{\gdef\@elsarticleabstitle{#1}} %*%
\abstracttitle{Abstract} %*%
\renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup
\hsize=\textwidth\def\baselinestretch{1}%
\noindent\unskip\textbf{\@elsarticleabstitle} %*%
\par\medskip\noindent\unskip\ignorespaces}
{\egroup}
When using the command \abstract directly, which underlies the
encironment "abstract", instead of the environment, this gets you
\global\setbox\absbox=\vbox\bgroup %%<- this \bgroup starts the
%% content of the \vbox
\hsize=\textwidth\def\baselinestretch{1}%
\noindent\unskip\textbf{\@elsarticleabstitle} %*%
\par\medskip\noindent\unskip\ignorespaces
{...} %% <- This is a brace-balanced group
%% An \egroup or closing brace ending the content of the \vbox is
%% missing.
, where the closing-brace or the \egroup-token denoting the end of the
content of the \vbox is missing.
Altenatively, instead of using "abstract" as an environment, you can do
\abstract{...}\egroup
or
\abstract{...}}%
, but those are not good practise.
Ulrich
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)