Re: LaTeX problem

Liste des GroupesRevenir à ct tex 
Sujet : Re: LaTeX problem
De : ud.usenetcorrespondence (at) *nospam* web.de (Ulrich D i e z)
Groupes : comp.text.tex
Date : 07. Apr 2025, 08:30:26
Autres entêtes
Message-ID : <vsvuub$sfgb$1@solani.org>
References : 1
User-Agent : Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
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

Date Sujet#  Auteur
6 Apr 25 * LaTeX problem8db
6 Apr 25 +- Re: LaTeX problem1Athel Cornish-Bowden
6 Apr 25 +- Re: LaTeX problem1Marckus
7 Apr 25 `* Re: LaTeX problem5Ulrich D i e z
7 Apr 25  `* Re: LaTeX problem4db
7 Apr 25   `* Re: LaTeX problem3db
8 Apr 25    `* Re: LaTeX problem2Ulrich D i e z
8 Apr 25     `- Re: LaTeX problem1Ulrich D i e z

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal