1 % \iffalse meta-comment
3 % Copyright (C) 2007, 2008, 2009 by Elsevier Ltd
4 % -----------------------------------------------
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.2
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
11 % http://www.latex-project.org/lppl.txt
13 % and version 1.2 or later is part of all distributions of LaTeX
14 % version 1999/12/01 or later.
21 \documentclass{ltxdoc}
27 \DocInput{elsarticle.dtx}
35 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
36 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
37 % Digits \0\1\2\3\4\5\6\7\8\9
38 % Exclamation \! Double quote \" Hash (number) \#
39 % Dollar \$ Percent \% Ampersand \&
40 % Acute accent \' Left paren \( Right paren \)
41 % Asterisk \* Plus \+ Comma \,
42 % Minus \- Point \. Solidus \/
43 % Colon \: Semicolon \; Less than \<
44 % Equals \= Greater than \> Question mark \?
45 % Commercial at \@ Left bracket \[ Backslash \\
46 % Right bracket \] Circumflex \^ Underscore \_
47 % Grave accent \` Left brace \{ Vertical bar \|
48 % Right brace \} Tilde \~}
51 % \changes{v1.1}{2008/09/25}{Initial version}
54 % \changes{v1.2}{2009/09/17}{Documentation, templates, and *.bst
55 % has been seperated from this .dtx. Incompatibility problems
56 % with amsref.sty, fncylab.sty have been fixed. Some bugs related
57 % to author/affiliation part have been fixed.}
59 % \GetFileInfo{elsarticle.dtx}
61 % \DoNotIndex{\newcommand,\newenvironment}
64 % \title{The \textsf{elsarticle.cls} -- Implimentation}
65 % \author{Elsevier Ltd}
71 % \section{Implementation}
76 %% $Id: elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp $
78 \def\RCSfile{elsarticle}%
79 \def\RCSversion{1.2.0}%
80 \def\RCSdate{2009/09/17}%
81 \def\@shortjnl{\relax}
82 \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd}
84 \def\@shortjid{elsarticle}
85 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
86 \ProvidesClass{\@shortjid}[\RCSdate, \RCSversion: \@journal]
87 \def\ABD{\AtBeginDocument}
88 \newif\ifpreprint \preprintfalse
89 \newif\iflongmktitle \longmktitlefalse
96 *****************************************************\MessageBreak
97 This document is typeset in the CRC style which\MessageBreak
98 is not suitable for submission.\MessageBreak
100 Please typeset again using 'preprint' option\MessageBreak
101 for creating PDF suitable for submission.\MessageBreak
102 ******************************************************\MessageBreak
105 \DeclareOption{preprint}{\global\preprinttrue
106 \gdef\@blstr{1}\xdef\jtype{0}%
107 \AtBeginDocument{\@twosidefalse\@mparswitchfalse}}
108 \DeclareOption{final}{\gdef\@blstr{1}\global\preprintfalse}
109 \DeclareOption{review}{\global\preprinttrue\gdef\@blstr{1.5}}
110 \DeclareOption{authoryear}{\xdef\@biboptions{round,authoryear}}
111 \DeclareOption{number}{\xdef\@biboptions{numbers}}
112 \DeclareOption{numbers}{\xdef\@biboptions{numbers}}
113 \DeclareOption{longtitle}{\global\longmktitletrue}
114 \DeclareOption{5p}{\xdef\jtype{5}\global\preprintfalse
115 \ExecuteOptions{twocolumn}}
117 \DeclareOption{3p}{\xdef\jtype{3}\global\preprintfalse}
118 \DeclareOption{1p}{\xdef\jtype{1}\global\preprintfalse
119 \AtBeginDocument{\@twocolumnfalse}}
120 \DeclareOption{times}{\IfFileExists{txfonts.sty}%
121 {\AtEndOfClass{\RequirePackage{txfonts}%
122 \gdef\ttdefault{cmtt}%
127 \let\openbox\relax}}{\RequirePackage{times}}}
128 \ExecuteOptions{a4paper,10pt,oneside,onecolumn,number,preprint}
129 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
132 \RequirePackage{graphicx}
140 \def\title#1{\gdef\@title{#1}}
143 \def\elsLabel#1{\@bsphack\protected@write\@auxout{}%
144 {\string\Newlabel{#1}{\@currentlabel}}\@esphack}
145 \def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}}
147 \def\elsRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}%
150 \def\tnotemark[#1]{\textsuperscript{\@for\@@tmark:=#1\do{%
151 \edef\tnotenum{\@ifundefined{X@\@@tmark}{1}{\elsRef{\@@tmark}}}%
152 \ifcase\tnotenum\or\ding{73}\or,\ding{73}\ding{73}\fi}}%
154 \let\@tnotemark\@empty
157 \RequirePackage{pifont}
159 \def\tnotetext[#1]#2{\g@addto@macro\@tnotes{%
160 \refstepcounter{tnote}\elsLabel{#1}%
161 \def\thefootnote{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}%
164 \let\@nonumnotes\@empty
165 \def\nonumnote#1{\g@addto@macro\@nonumnotes{%
166 \let\thefootnote\relax\footnotetext{#1}}}
169 \def\fnmark[#1]{\let\comma\@empty
170 \def\@fnmark{\@for\@@fnmark:=#1\do{%
171 \edef\fnotenum{\@ifundefined{X@\@@fnmark}{1}{\elsRef{\@@fnmark}}}%
172 \unskip\comma\fnotenum\let\comma,}}%
175 \let\@fnotes\@empty\let\@fnmark\@empty
176 \def\fntext[#1]#2{\g@addto@macro\@fnotes{%
177 \refstepcounter{fnote}\elsLabel{#1}%
178 \def\thefootnote{\thefnote}%
179 \global\setcounter{footnote}{\thefnote}%
182 \def\cormark[#1]{\edef\cnotenum{\elsRef{#1}}%
183 \unskip\textsuperscript{\sep\ifcase\cnotenum\or
184 $\ast$\or$\ast\ast$\fi\hspace{-1pt}}\let\sep=,}
187 \let\@cornotes\@empty
189 \def\cortext[#1]#2{\g@addto@macro\@cornotes{%
190 \refstepcounter{cnote}\elsLabel{#1}%
191 \def\thefootnote{\ifcase\thecnote\or$\ast$\or
196 %\def\corref#1{\cormark[#1]}
197 \def\corref#1{\edef\cnotenum{\elsRef{#1}}%
198 \edef\@corref{\ifcase\cnotenum\or
199 $\ast$\or$\ast\ast$\fi\hskip-1pt}}
201 \def\fnref#1{\fnmark[#1]}
202 \def\tnoteref#1{\tnotemark[#1]}
204 \def\resetTitleCounters{\c@cnote=0
205 \c@fnote=0 \c@tnote=0 \c@footnote=0}
211 \def\hashchar{\expandafter\@gobble\string\~}
212 \def\underscorechar{\expandafter\@gobble\string\_}
213 \def\lbracechar{\expandafter\@gobble\string\{}
214 \def\rbracechar{\expandafter\@gobble\string\}}
216 \def\ead{\@ifnextchar[{\@uad}{\@ead}}
217 \gdef\@ead#1{\bgroup\def\_{\string\underscorechar\space}%
218 \def\{{\string\lbracechar\space}%
219 \def~{\hashchar\space}%
220 \def\}{\string\rbracechar\space}%
221 \edef\tmp{\the\@eadauthor}
222 \immediate\write\@auxout{\string\emailauthor
223 {#1}{\expandafter\strip@prefix\meaning\tmp}}%
227 \gdef\emailauthor#1#2{\stepcounter{ead}%
228 \g@addto@macro\@elseads{\raggedright%
230 \eadsep\texttt{#1} (#2)\def\eadsep{\unskip,\space}}%
232 \gdef\@uad[#1]#2{\bgroup
233 \def~{\string\hashchar\space}%
234 \def\_{\string\underscorechar\space}%
235 \edef\tmp{\the\@eadauthor}
236 \immediate\write\@auxout{\string\urlauthor
237 {#2}{\expandafter\strip@prefix\meaning\tmp}}%
240 \def\urlauthor#1#2{\g@addto@macro\@elsuads{\let\corref\@gobble%
241 \raggedright\eadsep\texttt{#1}\space(#2)%
242 \def\eadsep{\unskip,\space}}%
247 \let\authorsep\@empty
250 \def\author{\@ifnextchar[{\@@author}{\@author}}
253 \def\@@author[#1]#2{\g@addto@macro\elsauthors{%
254 \def\baselinestretch{1}%
255 \authorsep#2\unskip\textsuperscript{%#1%
256 \@for\@@affmark:=#1\do{%
257 \edef\affnum{\@ifundefined{X@\@@affmark}{1}{\elsRef{\@@affmark}}}%
258 \unskip\sep\affnum\let\sep=,}%
259 \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi
260 \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi
262 \def\authorsep{\unskip,\space}%
263 \global\let\sep\@empty\global\let\@corref\@empty
264 \global\let\@fnmark\@empty}%
268 \def\@author#1{\g@addto@macro\elsauthors{\normalsize%
269 \def\baselinestretch{1}%
270 \upshape\authorsep#1\unskip\textsuperscript{%
271 \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi
272 \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi
274 \def\authorsep{\unskip,\space}%
275 \global\let\@fnmark\@empty
276 \global\let\sep\@empty}%
281 \def\addsep{\par\vskip6pt}
282 \def\address{\@ifnextchar[{\@@address}{\@address}}
285 \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or
286 l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
288 \or aa\or ab\or ac\or ad\or ae\or af\or ag\or ah\or ai\or aj\or
289 ak\or al\or am\or an\or ao\or ap\or aq\or ar\or as\or at\or au\or
290 av\or aw\or ax\or ay\or az%
291 \or ba\or bb\or bc\or bd\or be\or bf\or bg\or bh\or bi\or bj\or
292 bk\or bl\or bm\or bn\or bo\or bp\or bq\or br\or bs\or bt\or bu\or
293 bv\or bw\or bx\or by\or bz%
294 \or ca\or cb\or cc\or cd\or ce\or cf\or cg\or ch\or ci\or cj\or
295 ck\or cl\or cm\or cn\or co\or cp\or cq\or cr\or cs\or ct\or cu\or
296 cv\or cw\or cx\or cy\or cz%
297 \or da\or db\or dc\or dd\or de\or df\or dg\or dh\or di\or dj\or
298 dk\or dl\or dm\or dn\or do\or dp\or dq\or dr\or ds\or dt\or du\or
299 dv\or dw\or dx\or dy\or dz%
300 \or ea\or eb\or ec\or ed\or ee\or ef\or eg\or eh\or ei\or ej\or
301 ek\or el\or em\or en\or eo\or ep\or eq\or er\or es\or et\or eu\or
302 ev\or ew\or ex\or ey\or ez%
303 \or fa\or fb\or fc\or fd\or fe\or ff\or fg\or fh\or fi\or fj\or
304 fk\or fl\or fm\or fn\or fo\or fp\or fq\or fr\or fs\or ft\or fu\or
305 fv\or fw\or fx\or fy\or fz%
306 \or ga\or gb\or gc\or gd\or ge\or gf\or gg\or gh\or gi\or gj\or
307 gk\or gl\or gm\or gn\or go\or gp\or gq\or gr\or gs\or gt\or gu\or
308 gv\or gw\or gx\or gy\or gz%
312 \renewcommand\theaffn{\alph{affn}}
314 \long\def\@@address[#1]#2{\g@addto@macro\elsaddress{%
315 \def\baselinestretch{1}%
316 \refstepcounter{affn}
317 \xdef\@currentlabel{\theaffn}
319 \textsuperscript{\theaffn}#2\par}}
321 \long\def\@address#1{\g@addto@macro\elsauthors{%
322 \def\baselinestretch{1}%
323 \addsep\footnotesize\itshape#1\def\addsep{\par\vskip6pt}%
324 \def\authorsep{\par\vskip8pt}}}
327 \renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup
328 \hsize=\textwidth\def\baselinestretch{1}%
329 \noindent\unskip\textbf{Abstract}
330 \par\medskip\noindent\unskip\ignorespaces}
336 \def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}}
337 \def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}%
338 \def\PACS{\par\leavevmode\hbox {\it PACS:\space}}%
339 \def\JEL{\par\leavevmode\hbox {\it JEL:\space}}%
340 \global\setbox\keybox=\vbox\bgroup\hsize=\textwidth
341 \normalsize\normalfont\def\baselinestretch{1}
343 \noindent\textit{Keywords: }
344 \raggedright % Keywords are not justified.
346 \def\endkeyword{\par \egroup}
348 \newdimen\Columnwidth
349 \Columnwidth=\columnwidth
351 \def\printFirstPageNotes{%
353 \let\columnwidth=\textwidth\fi
354 \ifx\@tnotes\@empty\else\@tnotes\fi
355 \ifx\@nonumnotes\@empty\else\@nonumnotes\fi
356 \ifx\@cornotes\@empty\else\@cornotes\fi
357 \ifx\@elseads\@empty\relax\else
358 \let\thefootnote\relax
359 \footnotetext{\ifnum\theead=1\relax
360 \textit{Email address:\space}\else
361 \textit{Email addresses:\space}\fi
363 \ifx\@elsuads\@empty\relax\else
364 \let\thefootnote\relax
365 \footnotetext{\textit{URL:\space}%
367 \ifx\@fnotes\@empty\else\@fnotes\fi
368 \iflongmktitle\if@twocolumn
369 \let\columnwidth=\Columnwidth\fi\fi
372 \long\def\pprintMaketitle{\clearpage
373 \iflongmktitle\if@twocolumn\let\columnwidth=\textwidth\fi\fi
375 \def\baselinestretch{1}%
378 \thispagestyle{pprintTitle}%
379 \def\baselinestretch{1}%
380 \Large\@title\par\vskip18pt
381 \normalsize\elsauthors\par\vskip10pt
382 \footnotesize\itshape\elsaddress\par\vskip36pt
384 \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
385 \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
388 \gdef\thefootnote{\arabic{footnote}}%
392 \mbox{}\par\vfill\par\bgroup
393 \fboxsep12pt\fboxrule1pt
394 \hspace*{.18\textwidth}
395 \fcolorbox{gray50}{gray10}{\box\warnbox}
396 \egroup\par\vfill\thispagestyle{empty}
400 \long\def\finalMaketitle{%
402 \def\baselinestretch{1}%
404 \thispagestyle{pprintTitle}%
405 \gdef\thefootnote{\arabic{footnote}}%
408 \long\def\MaketitleBox{%
410 \def\baselinestretch{1}%
412 \def\baselinestretch{1}%
413 \Large\@title\par\vskip18pt
414 \normalsize\elsauthors\par\vskip10pt
415 \footnotesize\itshape\elsaddress\par\vskip36pt
417 \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
418 \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
423 \def\FNtext#1{\par\bgroup\footnotesize#1\egroup}
425 \def\alarm#1{\typeout{******************************}%
427 \typeout{******************************}%
429 \long\def\getSpaceLeft{%\global\@twocolumnfalse%
430 \global\setbox0=\vbox{\hsize=\textwidth\MaketitleBox}%
431 \global\setbox1=\vbox{\hsize=\textwidth
432 \let\footnotetext\FNtext
433 \printFirstPageNotes}%
434 \xdef\noteheight{\the\ht1}%
435 \xdef\titleheight{\the\ht0}%
437 \advance\@tempdima-\noteheight
438 \advance\@tempdima-1\baselineskip
447 \def\maketitle{\pprintMaketitle}
451 \iflongmktitle\getSpaceLeft
452 \global\setbox\els@boxa=\vsplit0 to \@tempdima
453 \box\els@boxa\par\resetTitleCounters
454 \thispagestyle{pprintTitle}%
458 \finalMaketitle\printFirstPageNotes
460 \gdef\thefootnote{\arabic{footnote}}}%
464 \iflongmktitle\getSpaceLeft
465 \global\setbox\els@boxa=\vsplit0 to \@tempdima
466 \box\els@boxa\par\resetTitleCounters
467 \thispagestyle{pprintTitle}%
469 \twocolumn[\box0]%\printFirstPageNotes
471 \twocolumn[\finalMaketitle]\printFirstPageNotes
473 \gdef\thefootnote{\arabic{footnote}}}
477 \iflongmktitle\getSpaceLeft
478 \global\setbox\els@boxa=\vsplit0 to \@tempdima
479 \box\els@boxa\par\resetTitleCounters
480 \thispagestyle{pprintTitle}%
484 \twocolumn[\finalMaketitle]\printFirstPageNotes
486 \gdef\thefootnote{\arabic{footnote}}}%
489 \iflongmktitle\getSpaceLeft
490 \global\setbox\els@boxa=\vsplit0 to \@tempdima
491 \box\els@boxa\par\resetTitleCounters
492 \thispagestyle{pprintTitle}%
496 \finalMaketitle\printFirstPageNotes
498 \gdef\thefootnote{\arabic{footnote}}}%
505 %\section{Headers/footers}
508 \def\ps@pprintTitle{%
510 \let\@evenhead\@empty
511 \def\@oddfoot{\footnotesize\itshape
512 Preprint submitted to \ifx\@journal\@empty Elsevier
513 \else\@journal\fi\hfill\today}%
514 \let\@evenfoot\@oddfoot}
517 % \section{Section headings}
521 \def\@seccntformat#1{\csname the#1\endcsname\@seccntDot\hskip 0.5em}
523 \renewcommand\section{\@startsection {section}{1}{\z@}%
524 {18\p@ \@plus 6\p@ \@minus 3\p@}%
525 {9\p@ \@plus 6\p@ \@minus 3\p@}%
526 {\normalsize\bfseries\boldmath}}
527 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
528 {12\p@ \@plus 6\p@ \@minus 3\p@}%
529 {3\p@ \@plus 6\p@ \@minus 3\p@}%
530 {\normalfont\normalsize\itshape}}
531 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
532 {12\p@ \@plus 6\p@ \@minus 3\p@}%
534 {\normalfont\normalsize\itshape}}
536 \def\paragraph{\secdef{\els@aparagraph}{\els@bparagraph}}
537 \def\els@aparagraph[#1]#2{\elsparagraph[#1]{#2.}}
538 \def\els@bparagraph#1{\elsparagraph*{#1.}}
540 \newcommand\elsparagraph{\@startsection{paragraph}{4}{0\z@}%
541 {10\p@ \@plus 6\p@ \@minus 3\p@}%
543 {\normalfont\itshape}}
546 %\section{List environment}
551 \newtoks\@enLab %\newtoks\@enfont
554 \edef\@enThe{\noexpand#1{\@enumctr}}%
555 \@enLab\expandafter{\the\@enLab\csname the\@enumctr\endcsname}%
557 \def\@enSpace{\afterassignment\@enSp@ce\let\@tempa= }
558 \def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop}
559 \def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop}
560 \def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop}
561 \def\@enloop{\futurelet\@entemp\@enloop@}
563 \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else
564 \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else
565 \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else
566 \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else
567 \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else
568 \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else
569 \ifx \bgroup\@entemp \let\@tempa\@enGroup \else
570 \ifx \@enum@\@entemp \let\@tempa\@gobble \else
572 \fi\fi\fi\fi\fi\fi\fi\fi
574 \newlength{\@sep} \newlength{\@@sep}
575 \setlength{\@sep}{.5\baselineskip plus.2\baselineskip
576 minus.2\baselineskip}
577 \setlength{\@@sep}{.1\baselineskip plus.01\baselineskip
578 minus.05\baselineskip}
579 \providecommand{\sfbc}{\rmfamily\upshape}
580 \providecommand{\sfn}{\rmfamily\upshape}
581 \def\@enfont{\ifnum \@enumdepth >1\let\@nxt\sfn \else\let\@nxt\sfbc \fi\@nxt}
583 \ifnum \@enumdepth >3 \@toodeep\else
584 \advance\@enumdepth \@ne
585 \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi
586 \@ifnextchar[{\@@enum@}{\@enum@}}
588 \@enLab{}\let\@enThe\@enQmark
590 \ifx\@enThe\@enQmark\@warning{The counter will not be printed.%
591 ^^J\space\@spaces\@spaces\@spaces The label is: \the\@enLab}\fi
592 \expandafter\edef\csname label\@enumctr\endcsname{\the\@enLab}%
593 \expandafter\let\csname the\@enumctr\endcsname\@enThe
594 \csname c@\@enumctr\endcsname7
595 \expandafter\settowidth
596 \csname leftmargin\romannumeral\@enumdepth\endcsname
597 {\the\@enLab\hskip\labelsep}%
599 \def\@enum@{\list{{\@enfont\csname label\@enumctr\endcsname}}%
600 {\usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}%
601 \ifnum \@enumdepth>1\setlength{\topsep}{\@@sep}\else
602 \setlength{\topsep}{\@sep}\fi
603 \ifnum \@enumdepth>1\setlength{\itemsep}{0pt plus1pt minus1pt}%
604 \else \setlength{\itemsep}{\@@sep}\fi
605 %\setlength\leftmargin{\leftMargin}%%%{1.8em}
606 \setlength{\parsep}{0pt plus1pt minus1pt}%
607 \setlength{\parskip}{0pt plus1pt minus1pt}
610 \def\endenumerate{\par\ifnum \@enumdepth >1\addvspace{\@@sep}\else
611 \addvspace{\@sep}\fi \endlist}
613 \def\sitem{\@noitemargtrue\@item[\@itemlabel *]}
615 \def\itemize{\@ifnextchar[{\@Itemize}{\@Itemize[]}}
617 \def\@Itemize[#1]{\def\next{#1}%
618 \ifnum \@itemdepth >\thr@@\@toodeep\else
619 \advance\@itemdepth\@ne
620 \ifx\next\@empty\else\expandafter\def\csname
621 labelitem\romannumeral\the\@itemdepth\endcsname{#1}\fi%
622 \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
623 \expandafter\list\csname\@itemitem\endcsname
624 {\def\makelabel##1{\hss\llap{##1}}}%
628 %\section{Theorem environment}
631 \def\newdefinition#1{%
632 \@ifnextchar[{\@odfn{#1}}{\@ndfn{#1}}}%]
634 \@ifnextchar[{\@xndfn{#1}{#2}}{\@yndfn{#1}{#2}}}
635 \def\@xndfn#1#2[#3]{%
636 \expandafter\@ifdefinable\csname #1\endcsname
637 {\@definecounter{#1}\@newctr{#1}[#3]%
638 \expandafter\xdef\csname the#1\endcsname{%
639 \expandafter\noexpand\csname the#3\endcsname \@dfncountersep
641 \global\@namedef{#1}{\@dfn{#1}{#2}}%
642 \global\@namedef{end#1}{\@enddefinition}}}
644 \expandafter\@ifdefinable\csname #1\endcsname
645 {\@definecounter{#1}%
646 \expandafter\xdef\csname the#1\endcsname{\@dfncounter{#1}}%
647 \global\@namedef{#1}{\@dfn{#1}{#2}}%
648 \global\@namedef{end#1}{\@enddefinition}}}
650 \@ifundefined{c@#2}{\@nocounterr{#2}}%
651 {\expandafter\@ifdefinable\csname #1\endcsname
652 {\global\@namedef{the#1}{\@nameuse{the#2}}
653 \global\@namedef{#1}{\@dfn{#2}{#3}}%
654 \global\@namedef{end#1}{\@enddefinition}}}}
657 \@ifnextchar[{\@ydfn{#1}{#2}}{\@xdfn{#1}{#2}}}
659 \@begindefinition{#2}{\csname the#1\endcsname}\ignorespaces}
661 \@opargbegindefinition{#2}{\csname the#1\endcsname}{#3}\ignorespaces}
662 \def\@dfncounter#1{\noexpand\arabic{#1}}
663 \def\@dfncountersep{.}
664 \def\@begindefinition#1#2{\trivlist
665 \item[\hskip\labelsep{\bfseries #1\ #2.}]\upshape}
666 \def\@opargbegindefinition#1#2#3{\trivlist
667 \item[\hskip\labelsep{\bfseries #1\ #2\ (#3).}]\upshape}
668 \def\@enddefinition{\endtrivlist}
670 \def\@begintheorem#1#2{\trivlist
671 \let\baselinestretch\@blstr
672 \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape}
673 \def\@opargbegintheorem#1#2#3{\trivlist
674 \let\baselinestretch\@blstr
675 \item[\hskip \labelsep{\bfseries #1\ #2\ (#3).}]\itshape}
678 \@ifnextchar[{\@oprf{#1}}{\@nprf{#1}}}
680 \@ifnextchar[{\@xnprf{#1}{#2}}{\@ynprf{#1}{#2}}}
681 \def\@xnprf#1#2[#3]{%
682 \expandafter\@ifdefinable\csname #1\endcsname
683 {\@definecounter{#1}\@newctr{#1}[#3]%
684 \expandafter\xdef\csname the#1\endcsname{%
685 \expandafter\noexpand\csname the#3\endcsname \@prfcountersep
687 \global\@namedef{#1}{\@prf{#1}{#2}}%
688 \global\@namedef{end#1}{\@endproof}}}
690 \expandafter\@ifdefinable\csname #1\endcsname
691 {\@definecounter{#1}%
692 \expandafter\xdef\csname the#1\endcsname{\@prfcounter{#1}}%
693 \global\@namedef{#1}{\@prf{#1}{#2}}%
694 \global\@namedef{end#1}{\@endproof}}}
696 \@ifundefined{c@#2}{\@nocounterr{#2}}%
697 {\expandafter\@ifdefinable\csname #1\endcsname
698 {\global\@namedef{the#1}{\@nameuse{the#2}}%
699 \global\@namedef{#1}{\@prf{#2}{#3}}%
700 \global\@namedef{end#1}{\@endproof}}}}
703 \@ifnextchar[{\@yprf{#1}{#2}}{\@xprf{#1}{#2}}}
705 \@beginproof{#2}{\csname the#1\endcsname}\ignorespaces}
707 \@opargbeginproof{#2}{\csname the#1\endcsname}{#3}\ignorespaces}
708 \def\@prfcounter#1{\noexpand\arabic{#1}}
709 \def\@prfcountersep{.}
710 \def\@beginproof#1#2{\trivlist\let\baselinestretch\@blstr
711 \item[\hskip \labelsep{\scshape #1.}]\rmfamily}
712 \def\@opargbeginproof#1#2#3{\trivlist\let\baselinestretch\@blstr
713 \item[\hskip \labelsep{\scshape #1\ (#3).}]\rmfamily}
714 \def\@endproof{\endtrivlist}
715 \newcommand*{\qed}{\hbox{}\hfill$\Box$}
717 \@ifundefined{@biboptions}{\xdef\@biboptions{numbers}}{}
718 \InputIfFileExists{\jobname.spl}{}{}
719 \RequirePackage[\@biboptions]{natbib}
722 \immediate\openout\splwrite=\jobname.spl
723 \def\biboptions#1{\def\next{#1}\immediate\write\splwrite{%
724 \string\g@addto@macro\string\@biboptions{%
725 ,\expandafter\strip@prefix\meaning\next}}}
727 \let\baselinestretch=\@blstr
731 %\section{Page dimensions and margins for final form}
733 %\subsection{Option 1p}
737 \RequirePackage{geometry}
747 footnotesep=24pt plus 2pt minus 12pt,
749 \global\let\bibfont=\footnotesize
751 \if@twocolumn\global\@twocolumnfalse\fi
755 %\subsection{Option '3p'}
759 \RequirePackage{geometry}
769 footnotesep=24pt plus 2pt minus 12pt,
772 \global\let\bibfont=\footnotesize
774 \if@twocolumn\input{fleqn.clo}\fi
777 %\subsection{Option '5p'}
781 \RequirePackage{geometry}
791 footnotesep=24pt plus 2pt minus 12pt,
794 \global\let\bibfont=\footnotesize
797 \global\@twocolumntrue
799 %% End of option '5p'
804 %\section{Other items}
807 \def\journal#1{\gdef\@journal{#1}}
809 \newenvironment{frontmatter}{}{\maketitle}
811 \long\def\@makecaption#1#2{%
812 \vskip\abovecaptionskip\footnotesize
813 \sbox\@tempboxa{#1: #2}%
814 \ifdim \wd\@tempboxa >\hsize
817 \global \@minipagefalse
818 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
820 \vskip\belowcaptionskip}
822 \AtBeginDocument{\@ifpackageloaded{hyperref}
823 {\def\@linkcolor{blue}
824 \def\@anchorcolor{blue}
825 \def\@citecolor{blue}
826 \def\@filecolor{blue}
828 \def\@menucolor{blue}
829 \def\@pagecolor{blue}
837 \catcode 96=\noexpand\the\catcode`\noexpand\`\relax
838 \catcode 61=\noexpand\the\catcode`\noexpand\=\relax
848 \renewcommand\appendix{\par
849 \setcounter{section}{0}%
850 \setcounter{subsection}{0}%
851 \setcounter{equation}{0}
852 \gdef\thefigure{\@Alph\c@section.\arabic{figure}}%
853 \gdef\thetable{\@Alph\c@section.\arabic{table}}%
854 \gdef\thesection{\appendixname\@Alph\c@section}%
855 \@addtoreset{equation}{section}%
856 \gdef\theequation{\@Alph\c@section.\arabic{equation}}%
858 \def\appendixname{Appendix }
860 %% Added for work with amsrefs.sty
862 \@ifpackageloaded{amsrefs}%
864 {\let\bibsection\relax%
865 \AtBeginDocument{\def\cites@b#1#2,#3{%
867 \toks@{\InnerCite{#2}#1}%
868 \ifx\@empty#3\@xp\@gobble\fi
880 %% End of file 'elsarticle.dtx'