Re: LaTeX problem

Liste des GroupesRevenir à ct tex 
Sujet : Re: LaTeX problem
De : dieterhansbritz (at) *nospam* gmail.com (db)
Groupes : comp.text.tex
Date : 07. Apr 2025, 12:36:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vt0dcg$3la79$1@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Mon, 7 Apr 2025 09:47:29 -0000 (UTC), db wrote:

On Mon, 7 Apr 2025 09:30:26 +0200, Ulrich D i e z wrote:
 
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
 
Thank you! That did the trick.

But now there is a new problem. The title appears on both
pp. 1 and 2, the first without, the second with that Abstract.
What do I do now?
--
db

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