]> AND Private Git Repository - 16dcc.git/blob - elsarticle.cls
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modif presentation
[16dcc.git] / elsarticle.cls
1 %%
2 %% This is file `elsarticle.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% elsarticle.dtx  (with options: `class')
8 %% 
9 %% Copyright 2007, 2008, 2009 Elsevier Ltd
10 %% 
11 %% This file is part of the 'Elsarticle Bundle'.
12 %% -------------------------------------------
13 %% 
14 %% It may be distributed under the conditions of the LaTeX Project Public
15 %% License, either version 1.2 of this license or (at your option) any
16 %% later version.  The latest version of this license is in
17 %%    http://www.latex-project.org/lppl.txt
18 %% and version 1.2 or later is part of all distributions of LaTeX
19 %% version 1999/12/01 or later.
20 %% 
21 %% The list of all files belonging to the 'Elsarticle Bundle' is
22 %% given in the file `manifest.txt'.
23 %% 
24 %%
25 %% $Id: elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp $
26 %%
27  \def\RCSfile{elsarticle}%
28  \def\RCSversion{1.2.0}%
29  \def\RCSdate{2009/09/17}%
30  \def\@shortjnl{\relax}
31  \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd}
32  \def\@issn{000-0000}
33  \def\@shortjid{elsarticle}
34 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
35 \ProvidesClass{\@shortjid}[\RCSdate, \RCSversion: \@journal]
36 \def\ABD{\AtBeginDocument}
37 \newif\ifpreprint \preprintfalse
38 \newif\iflongmktitle \longmktitlefalse
39
40 \def\@blstr{1}
41 \newdimen\@bls
42 \@bls=\baselineskip
43
44 \def\@finalWarning{%
45   *****************************************************\MessageBreak
46    This document is typeset in the CRC style which\MessageBreak
47    is not suitable for submission.\MessageBreak
48    \MessageBreak
49    Please typeset again using 'preprint' option\MessageBreak
50    for creating PDF suitable for submission.\MessageBreak
51   ******************************************************\MessageBreak
52 }
53
54 \DeclareOption{preprint}{\global\preprinttrue
55   \gdef\@blstr{1}\xdef\jtype{0}%
56    \AtBeginDocument{\@twosidefalse\@mparswitchfalse}}
57 \DeclareOption{final}{\gdef\@blstr{1}\global\preprintfalse}
58 \DeclareOption{review}{\global\preprinttrue\gdef\@blstr{1.5}}
59 \DeclareOption{authoryear}{\xdef\@biboptions{round,authoryear}}
60 \DeclareOption{number}{\xdef\@biboptions{numbers}}
61 \DeclareOption{numbers}{\xdef\@biboptions{numbers}}
62 \DeclareOption{longtitle}{\global\longmktitletrue}
63 \DeclareOption{5p}{\xdef\jtype{5}\global\preprintfalse
64   \ExecuteOptions{twocolumn}}
65   \def\jtype{0}
66 \DeclareOption{3p}{\xdef\jtype{3}\global\preprintfalse}
67 \DeclareOption{1p}{\xdef\jtype{1}\global\preprintfalse
68   \AtBeginDocument{\@twocolumnfalse}}
69 \DeclareOption{times}{\IfFileExists{txfonts.sty}%
70   {\AtEndOfClass{\RequirePackage{txfonts}%
71   \gdef\ttdefault{cmtt}%
72    \let\iint\relax
73   \let\iiint\relax
74   \let\iiiint\relax
75   \let\idotsint\relax
76   \let\openbox\relax}}{\RequirePackage{times}}}
77 \ExecuteOptions{a4paper,10pt,oneside,onecolumn,number,preprint}
78 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
79 \ProcessOptions
80 \LoadClass{article}
81 \RequirePackage{graphicx}
82 \let\comma\@empty
83 \let\tnotesep\@empty
84 \def\title#1{\gdef\@title{#1}}
85 \let\@title\@empty
86
87 \def\elsLabel#1{\@bsphack\protected@write\@auxout{}%
88          {\string\Newlabel{#1}{\@currentlabel}}\@esphack}
89 \def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}}
90
91 \def\elsRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}%
92 }
93
94 \def\tnotemark[#1]{\textsuperscript{\@for\@@tmark:=#1\do{%
95       \edef\tnotenum{\@ifundefined{X@\@@tmark}{1}{\elsRef{\@@tmark}}}%
96       \ifcase\tnotenum\or\ding{73}\or,\ding{73}\ding{73}\fi}}%
97 }
98 \let\@tnotemark\@empty
99
100 \let\@tnotes\@empty
101 \RequirePackage{pifont}
102 \newcounter{tnote}
103 \def\tnotetext[#1]#2{\g@addto@macro\@tnotes{%
104   \refstepcounter{tnote}\elsLabel{#1}%
105    \def\thefootnote{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}%
106     \footnotetext{#2}}}
107
108 \let\@nonumnotes\@empty
109 \def\nonumnote#1{\g@addto@macro\@nonumnotes{%
110      \let\thefootnote\relax\footnotetext{#1}}}
111
112 \newcounter{fnote}
113 \def\fnmark[#1]{\let\comma\@empty
114     \def\@fnmark{\@for\@@fnmark:=#1\do{%
115     \edef\fnotenum{\@ifundefined{X@\@@fnmark}{1}{\elsRef{\@@fnmark}}}%
116   \unskip\comma\fnotenum\let\comma,}}%
117 }
118
119 \let\@fnotes\@empty\let\@fnmark\@empty
120 \def\fntext[#1]#2{\g@addto@macro\@fnotes{%
121      \refstepcounter{fnote}\elsLabel{#1}%
122    \def\thefootnote{\thefnote}%
123    \global\setcounter{footnote}{\thefnote}%
124    \footnotetext{#2}}}
125
126 \def\cormark[#1]{\edef\cnotenum{\elsRef{#1}}%
127     \unskip\textsuperscript{\sep\ifcase\cnotenum\or
128        $\ast$\or$\ast\ast$\fi\hspace{-1pt}}\let\sep=,}
129
130 \let\@cormark\@empty
131 \let\@cornotes\@empty
132 \newcounter{cnote}
133 \def\cortext[#1]#2{\g@addto@macro\@cornotes{%
134     \refstepcounter{cnote}\elsLabel{#1}%
135     \def\thefootnote{\ifcase\thecnote\or$\ast$\or
136     $\ast\ast$\fi}%
137     \footnotetext{#2}}}
138
139 \let\@corref\@empty
140 \def\corref#1{\edef\cnotenum{\elsRef{#1}}%
141     \edef\@corref{\ifcase\cnotenum\or
142          $\ast$\or$\ast\ast$\fi\hskip-1pt}}
143
144 \def\fnref#1{\fnmark[#1]}
145 \def\tnoteref#1{\tnotemark[#1]}
146
147 \def\resetTitleCounters{\c@cnote=0
148    \c@fnote=0 \c@tnote=0 \c@footnote=0}
149
150 \let\eadsep\@empty
151 \let\@elseads\@empty
152 \let\@elsuads\@empty
153 \let\@cormark\@empty
154 \def\hashchar{\expandafter\@gobble\string\~}
155 \def\underscorechar{\expandafter\@gobble\string\_}
156 \def\lbracechar{\expandafter\@gobble\string\{}
157 \def\rbracechar{\expandafter\@gobble\string\}}
158
159 \def\ead{\@ifnextchar[{\@uad}{\@ead}}
160 \gdef\@ead#1{\bgroup\def\_{\string\underscorechar\space}%
161   \def\{{\string\lbracechar\space}%
162    \def~{\hashchar\space}%
163    \def\}{\string\rbracechar\space}%
164    \edef\tmp{\the\@eadauthor}
165    \immediate\write\@auxout{\string\emailauthor
166      {#1}{\expandafter\strip@prefix\meaning\tmp}}%
167   \egroup
168 }
169 \newcounter{ead}
170 \gdef\emailauthor#1#2{\stepcounter{ead}%
171      \g@addto@macro\@elseads{\raggedright%
172       \let\corref\@gobble
173       \eadsep\texttt{#1} (#2)\def\eadsep{\unskip,\space}}%
174 }
175 \gdef\@uad[#1]#2{\bgroup
176   \def~{\string\hashchar\space}%
177   \def\_{\string\underscorechar\space}%
178    \edef\tmp{\the\@eadauthor}
179    \immediate\write\@auxout{\string\urlauthor
180      {#2}{\expandafter\strip@prefix\meaning\tmp}}%
181   \egroup
182 }
183 \def\urlauthor#1#2{\g@addto@macro\@elsuads{\let\corref\@gobble%
184      \raggedright\eadsep\texttt{#1}\space(#2)%
185      \def\eadsep{\unskip,\space}}%
186 }
187
188 \def\elsauthors{}
189 \def\pprinttitle{}
190 \let\authorsep\@empty
191 \let\sep\@empty
192 \newcounter{author}
193 \def\author{\@ifnextchar[{\@@author}{\@author}}
194
195 \newtoks\@eadauthor
196 \def\@@author[#1]#2{\g@addto@macro\elsauthors{%
197     \def\baselinestretch{1}%
198     \authorsep#2\unskip\textsuperscript{%#1%
199       \@for\@@affmark:=#1\do{%
200        \edef\affnum{\@ifundefined{X@\@@affmark}{1}{\elsRef{\@@affmark}}}%
201      \unskip\sep\affnum\let\sep=,}%
202       \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi
203       \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi
204       }%
205     \def\authorsep{\unskip,\space}%
206     \global\let\sep\@empty\global\let\@corref\@empty
207     \global\let\@fnmark\@empty}%
208     \@eadauthor={#2}
209 }
210
211 \def\@author#1{\g@addto@macro\elsauthors{\normalsize%
212     \def\baselinestretch{1}%
213     \upshape\authorsep#1\unskip\textsuperscript{%
214       \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi
215       \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi
216       }%
217     \def\authorsep{\unskip,\space}%
218     \global\let\@fnmark\@empty
219     \global\let\sep\@empty}%
220     \@eadauthor={#1}
221 }
222
223 \def\elsaddress{}
224 \def\addsep{\par\vskip6pt}
225 \def\address{\@ifnextchar[{\@@address}{\@address}}
226
227 \def\@alph#1{%
228   \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
229   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
230   y\or z%
231   \or aa\or ab\or ac\or ad\or ae\or af\or ag\or ah\or ai\or aj\or
232   ak\or al\or am\or an\or ao\or ap\or aq\or ar\or as\or at\or au\or
233   av\or aw\or ax\or ay\or az%
234   \or ba\or bb\or bc\or bd\or be\or bf\or bg\or bh\or bi\or bj\or
235   bk\or bl\or bm\or bn\or bo\or bp\or bq\or br\or bs\or bt\or bu\or
236   bv\or bw\or bx\or by\or bz%
237   \or ca\or cb\or cc\or cd\or ce\or cf\or cg\or ch\or ci\or cj\or
238   ck\or cl\or cm\or cn\or co\or cp\or cq\or cr\or cs\or ct\or cu\or
239   cv\or cw\or cx\or cy\or cz%
240   \or da\or db\or dc\or dd\or de\or df\or dg\or dh\or di\or dj\or
241   dk\or dl\or dm\or dn\or do\or dp\or dq\or dr\or ds\or dt\or du\or
242   dv\or dw\or dx\or dy\or dz%
243   \or ea\or eb\or ec\or ed\or ee\or ef\or eg\or eh\or ei\or ej\or
244   ek\or el\or em\or en\or eo\or ep\or eq\or er\or es\or et\or eu\or
245   ev\or ew\or ex\or ey\or ez%
246   \or fa\or fb\or fc\or fd\or fe\or ff\or fg\or fh\or fi\or fj\or
247   fk\or fl\or fm\or fn\or fo\or fp\or fq\or fr\or fs\or ft\or fu\or
248   fv\or fw\or fx\or fy\or fz%
249   \or ga\or gb\or gc\or gd\or ge\or gf\or gg\or gh\or gi\or gj\or
250   gk\or gl\or gm\or gn\or go\or gp\or gq\or gr\or gs\or gt\or gu\or
251   gv\or gw\or gx\or gy\or gz%
252   \else\@ctrerr\fi}
253
254 \newcounter{affn}
255 \renewcommand\theaffn{\alph{affn}}
256
257 \long\def\@@address[#1]#2{\g@addto@macro\elsaddress{%
258     \def\baselinestretch{1}%
259      \refstepcounter{affn}
260      \xdef\@currentlabel{\theaffn}
261      \elsLabel{#1}%
262     \textsuperscript{\theaffn}#2\par}}
263
264 \long\def\@address#1{\g@addto@macro\elsauthors{%
265     \def\baselinestretch{1}%
266     \addsep\footnotesize\itshape#1\def\addsep{\par\vskip6pt}%
267     \def\authorsep{\par\vskip8pt}}}
268
269 \newbox\absbox
270 \renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup
271   \hsize=\textwidth\def\baselinestretch{1}%
272   \noindent\unskip\textbf{Abstract}
273  \par\medskip\noindent\unskip\ignorespaces}
274  {\egroup}
275
276 \newbox\keybox
277 \def\keyword{%
278   \def\sep{\unskip, }%
279  \def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}}
280   \def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}%
281   \def\PACS{\par\leavevmode\hbox {\it PACS:\space}}%
282   \def\JEL{\par\leavevmode\hbox {\it JEL:\space}}%
283   \global\setbox\keybox=\vbox\bgroup\hsize=\textwidth
284   \normalsize\normalfont\def\baselinestretch{1}
285   \parskip\z@
286   \noindent\textit{Keywords: }
287   \raggedright                         % Keywords are not justified.
288   \ignorespaces}
289 \def\endkeyword{\par \egroup}
290
291 \newdimen\Columnwidth
292 \Columnwidth=\columnwidth
293
294 \def\printFirstPageNotes{%
295   \iflongmktitle
296    \let\columnwidth=\textwidth\fi
297   \ifx\@tnotes\@empty\else\@tnotes\fi
298   \ifx\@nonumnotes\@empty\else\@nonumnotes\fi
299   \ifx\@cornotes\@empty\else\@cornotes\fi
300   \ifx\@elseads\@empty\relax\else
301    \let\thefootnote\relax
302    \footnotetext{\ifnum\theead=1\relax
303       \textit{Email address:\space}\else
304       \textit{Email addresses:\space}\fi
305      \@elseads}\fi
306   \ifx\@elsuads\@empty\relax\else
307    \let\thefootnote\relax
308    \footnotetext{\textit{URL:\space}%
309      \@elsuads}\fi
310   \ifx\@fnotes\@empty\else\@fnotes\fi
311   \iflongmktitle\if@twocolumn
312    \let\columnwidth=\Columnwidth\fi\fi
313 }
314
315 \long\def\pprintMaketitle{\clearpage
316   \iflongmktitle\if@twocolumn\let\columnwidth=\textwidth\fi\fi
317   \resetTitleCounters
318   \def\baselinestretch{1}%
319   \printFirstPageNotes
320   \begin{center}%
321  \thispagestyle{pprintTitle}%
322    \def\baselinestretch{1}%
323     \Large\@title\par\vskip18pt
324     \normalsize\elsauthors\par\vskip10pt
325     \footnotesize\itshape\elsaddress\par\vskip36pt
326     \hrule\vskip12pt
327     \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
328     \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
329     \hrule\vskip12pt
330     \end{center}%
331   \gdef\thefootnote{\arabic{footnote}}%
332   }
333
334 \def\printWarning{%
335      \mbox{}\par\vfill\par\bgroup
336      \fboxsep12pt\fboxrule1pt
337      \hspace*{.18\textwidth}
338      \fcolorbox{gray50}{gray10}{\box\warnbox}
339      \egroup\par\vfill\thispagestyle{empty}
340      \setcounter{page}{0}
341      \clearpage}
342
343 \long\def\finalMaketitle{%
344   \resetTitleCounters
345   \def\baselinestretch{1}%
346    \MaketitleBox
347    \thispagestyle{pprintTitle}%
348   \gdef\thefootnote{\arabic{footnote}}%
349   }
350
351 \long\def\MaketitleBox{%
352   \resetTitleCounters
353   \def\baselinestretch{1}%
354   \begin{center}%
355    \def\baselinestretch{1}%
356     \Large\@title\par\vskip18pt
357     \normalsize\elsauthors\par\vskip10pt
358     \footnotesize\itshape\elsaddress\par\vskip36pt
359     \hrule\vskip12pt
360     \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
361     \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
362     \hrule\vskip12pt
363     \end{center}%
364   }
365
366 \def\FNtext#1{\par\bgroup\footnotesize#1\egroup}
367 \newdimen\space@left
368 \def\alarm#1{\typeout{******************************}%
369              \typeout{#1}%
370              \typeout{******************************}%
371 }
372 \long\def\getSpaceLeft{%\global\@twocolumnfalse%
373    \global\setbox0=\vbox{\hsize=\textwidth\MaketitleBox}%
374    \global\setbox1=\vbox{\hsize=\textwidth
375     \let\footnotetext\FNtext
376     \printFirstPageNotes}%
377     \xdef\noteheight{\the\ht1}%
378     \xdef\titleheight{\the\ht0}%
379     \@tempdima=\vsize
380     \advance\@tempdima-\noteheight
381     \advance\@tempdima-1\baselineskip
382 }
383
384   \skip\footins=24pt
385
386 \newbox\els@boxa
387 \newbox\els@boxb
388
389 \ifpreprint
390   \def\maketitle{\pprintMaketitle}
391   \else
392    \ifnum\jtype=1
393     \def\maketitle{%
394       \iflongmktitle\getSpaceLeft
395        \global\setbox\els@boxa=\vsplit0 to \@tempdima
396        \box\els@boxa\par\resetTitleCounters
397        \thispagestyle{pprintTitle}%
398        \printFirstPageNotes
399        \box0%
400       \else
401        \finalMaketitle\printFirstPageNotes
402       \fi
403     \gdef\thefootnote{\arabic{footnote}}}%
404   \else
405  \ifnum\jtype=5
406     \def\maketitle{%
407       \iflongmktitle\getSpaceLeft
408        \global\setbox\els@boxa=\vsplit0 to \@tempdima
409        \box\els@boxa\par\resetTitleCounters
410        \thispagestyle{pprintTitle}%
411        \printFirstPageNotes
412        \twocolumn[\box0]%\printFirstPageNotes
413       \else
414        \twocolumn[\finalMaketitle]\printFirstPageNotes
415      \fi
416      \gdef\thefootnote{\arabic{footnote}}}
417   \else
418   \if@twocolumn
419     \def\maketitle{%
420       \iflongmktitle\getSpaceLeft
421        \global\setbox\els@boxa=\vsplit0 to \@tempdima
422        \box\els@boxa\par\resetTitleCounters
423        \thispagestyle{pprintTitle}%
424        \printFirstPageNotes
425        \twocolumn[\box0]%
426       \else
427        \twocolumn[\finalMaketitle]\printFirstPageNotes
428       \fi
429      \gdef\thefootnote{\arabic{footnote}}}%
430    \else
431     \def\maketitle{%
432       \iflongmktitle\getSpaceLeft
433        \global\setbox\els@boxa=\vsplit0 to \@tempdima
434        \box\els@boxa\par\resetTitleCounters
435        \thispagestyle{pprintTitle}%
436        \printFirstPageNotes
437        \box0%
438      \else
439        \finalMaketitle\printFirstPageNotes
440       \fi
441     \gdef\thefootnote{\arabic{footnote}}}%
442    \fi
443   \fi
444  \fi
445 \fi
446 \def\ps@pprintTitle{%
447      \let\@oddhead\@empty
448      \let\@evenhead\@empty
449      \def\@oddfoot{\footnotesize\itshape
450        Preprint submitted to \ifx\@journal\@empty Elsevier
451        \else\@journal\fi\hfill\today}%
452      \let\@evenfoot\@oddfoot}
453 \def\@seccntDot{.}
454 \def\@seccntformat#1{\csname the#1\endcsname\@seccntDot\hskip 0.5em}
455
456 \renewcommand\section{\@startsection {section}{1}{\z@}%
457            {18\p@ \@plus 6\p@ \@minus 3\p@}%
458            {9\p@ \@plus 6\p@ \@minus 3\p@}%
459            {\normalsize\bfseries\boldmath}}
460 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
461            {12\p@ \@plus 6\p@ \@minus 3\p@}%
462            {3\p@ \@plus 6\p@ \@minus 3\p@}%
463            {\normalfont\normalsize\itshape}}
464 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
465            {12\p@ \@plus 6\p@ \@minus 3\p@}%
466            {\p@}%
467            {\normalfont\normalsize\itshape}}
468
469 \def\paragraph{\secdef{\els@aparagraph}{\els@bparagraph}}
470 \def\els@aparagraph[#1]#2{\elsparagraph[#1]{#2.}}
471 \def\els@bparagraph#1{\elsparagraph*{#1.}}
472
473 \newcommand\elsparagraph{\@startsection{paragraph}{4}{0\z@}%
474            {10\p@ \@plus 6\p@ \@minus 3\p@}%
475            {-6\p@}%
476            {\normalfont\itshape}}
477 \newdimen\leftMargin
478 \leftMargin=2em
479 \newtoks\@enLab  %\newtoks\@enfont
480 \def\@enQmark{?}
481 \def\@enLabel#1#2{%
482   \edef\@enThe{\noexpand#1{\@enumctr}}%
483   \@enLab\expandafter{\the\@enLab\csname the\@enumctr\endcsname}%
484   \@enloop}
485 \def\@enSpace{\afterassignment\@enSp@ce\let\@tempa= }
486 \def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop}
487 \def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop}
488 \def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop}
489 \def\@enloop{\futurelet\@entemp\@enloop@}
490 \def\@enloop@{%
491   \ifx A\@entemp         \def\@tempa{\@enLabel\Alph  }\else
492   \ifx a\@entemp         \def\@tempa{\@enLabel\alph  }\else
493   \ifx i\@entemp         \def\@tempa{\@enLabel\roman }\else
494   \ifx I\@entemp         \def\@tempa{\@enLabel\Roman }\else
495   \ifx 1\@entemp         \def\@tempa{\@enLabel\arabic}\else
496   \ifx \@sptoken\@entemp \let\@tempa\@enSpace         \else
497   \ifx \bgroup\@entemp   \let\@tempa\@enGroup         \else
498   \ifx \@enum@\@entemp   \let\@tempa\@gobble          \else
499                          \let\@tempa\@enOther
500              \fi\fi\fi\fi\fi\fi\fi\fi
501   \@tempa}
502 \newlength{\@sep} \newlength{\@@sep}
503 \setlength{\@sep}{.5\baselineskip plus.2\baselineskip
504             minus.2\baselineskip}
505 \setlength{\@@sep}{.1\baselineskip plus.01\baselineskip
506             minus.05\baselineskip}
507 \providecommand{\sfbc}{\rmfamily\upshape}
508 \providecommand{\sfn}{\rmfamily\upshape}
509 \def\@enfont{\ifnum \@enumdepth >1\let\@nxt\sfn \else\let\@nxt\sfbc \fi\@nxt}
510 \def\enumerate{%
511    \ifnum \@enumdepth >3 \@toodeep\else
512       \advance\@enumdepth \@ne
513       \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi
514    \@ifnextchar[{\@@enum@}{\@enum@}}
515 \def\@@enum@[#1]{%
516   \@enLab{}\let\@enThe\@enQmark
517   \@enloop#1\@enum@
518   \ifx\@enThe\@enQmark\@warning{The counter will not be printed.%
519    ^^J\space\@spaces\@spaces\@spaces The label is: \the\@enLab}\fi
520   \expandafter\edef\csname label\@enumctr\endcsname{\the\@enLab}%
521   \expandafter\let\csname the\@enumctr\endcsname\@enThe
522   \csname c@\@enumctr\endcsname7
523   \expandafter\settowidth
524             \csname leftmargin\romannumeral\@enumdepth\endcsname
525             {\the\@enLab\hskip\labelsep}%
526   \@enum@}
527 \def\@enum@{\list{{\@enfont\csname label\@enumctr\endcsname}}%
528            {\usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}%
529      \ifnum \@enumdepth>1\setlength{\topsep}{\@@sep}\else
530            \setlength{\topsep}{\@sep}\fi
531      \ifnum \@enumdepth>1\setlength{\itemsep}{0pt plus1pt minus1pt}%
532       \else \setlength{\itemsep}{\@@sep}\fi
533      %\setlength\leftmargin{\leftMargin}%%%{1.8em}
534      \setlength{\parsep}{0pt plus1pt minus1pt}%
535      \setlength{\parskip}{0pt plus1pt minus1pt}
536                    }}
537
538 \def\endenumerate{\par\ifnum \@enumdepth >1\addvspace{\@@sep}\else
539            \addvspace{\@sep}\fi \endlist}
540
541 \def\sitem{\@noitemargtrue\@item[\@itemlabel *]}
542
543 \def\itemize{\@ifnextchar[{\@Itemize}{\@Itemize[]}}
544
545 \def\@Itemize[#1]{\def\next{#1}%
546   \ifnum \@itemdepth >\thr@@\@toodeep\else
547    \advance\@itemdepth\@ne
548   \ifx\next\@empty\else\expandafter\def\csname
549    labelitem\romannumeral\the\@itemdepth\endcsname{#1}\fi%
550   \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
551   \expandafter\list\csname\@itemitem\endcsname
552   {\def\makelabel##1{\hss\llap{##1}}}%
553  \fi}
554 \def\newdefinition#1{%
555   \@ifnextchar[{\@odfn{#1}}{\@ndfn{#1}}}%]
556 \def\@ndfn#1#2{%
557   \@ifnextchar[{\@xndfn{#1}{#2}}{\@yndfn{#1}{#2}}}
558 \def\@xndfn#1#2[#3]{%
559   \expandafter\@ifdefinable\csname #1\endcsname
560     {\@definecounter{#1}\@newctr{#1}[#3]%
561      \expandafter\xdef\csname the#1\endcsname{%
562        \expandafter\noexpand\csname the#3\endcsname \@dfncountersep
563           \@dfncounter{#1}}%
564      \global\@namedef{#1}{\@dfn{#1}{#2}}%
565      \global\@namedef{end#1}{\@enddefinition}}}
566 \def\@yndfn#1#2{%
567   \expandafter\@ifdefinable\csname #1\endcsname
568     {\@definecounter{#1}%
569      \expandafter\xdef\csname the#1\endcsname{\@dfncounter{#1}}%
570      \global\@namedef{#1}{\@dfn{#1}{#2}}%
571      \global\@namedef{end#1}{\@enddefinition}}}
572 \def\@odfn#1[#2]#3{%
573   \@ifundefined{c@#2}{\@nocounterr{#2}}%
574     {\expandafter\@ifdefinable\csname #1\endcsname
575     {\global\@namedef{the#1}{\@nameuse{the#2}}
576   \global\@namedef{#1}{\@dfn{#2}{#3}}%
577   \global\@namedef{end#1}{\@enddefinition}}}}
578 \def\@dfn#1#2{%
579   \refstepcounter{#1}%
580   \@ifnextchar[{\@ydfn{#1}{#2}}{\@xdfn{#1}{#2}}}
581 \def\@xdfn#1#2{%
582   \@begindefinition{#2}{\csname the#1\endcsname}\ignorespaces}
583 \def\@ydfn#1#2[#3]{%
584   \@opargbegindefinition{#2}{\csname the#1\endcsname}{#3}\ignorespaces}
585 \def\@dfncounter#1{\noexpand\arabic{#1}}
586 \def\@dfncountersep{.}
587 \def\@begindefinition#1#2{\trivlist
588    \item[\hskip\labelsep{\bfseries #1\ #2.}]\upshape}
589 \def\@opargbegindefinition#1#2#3{\trivlist
590       \item[\hskip\labelsep{\bfseries #1\ #2\ (#3).}]\upshape}
591 \def\@enddefinition{\endtrivlist}
592
593 \def\@begintheorem#1#2{\trivlist
594   \let\baselinestretch\@blstr
595    \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape}
596 \def\@opargbegintheorem#1#2#3{\trivlist
597   \let\baselinestretch\@blstr
598       \item[\hskip \labelsep{\bfseries #1\ #2\ (#3).}]\itshape}
599
600 \def\newproof#1{%
601   \@ifnextchar[{\@oprf{#1}}{\@nprf{#1}}}
602 \def\@nprf#1#2{%
603   \@ifnextchar[{\@xnprf{#1}{#2}}{\@ynprf{#1}{#2}}}
604 \def\@xnprf#1#2[#3]{%
605   \expandafter\@ifdefinable\csname #1\endcsname
606     {\@definecounter{#1}\@newctr{#1}[#3]%
607      \expandafter\xdef\csname the#1\endcsname{%
608        \expandafter\noexpand\csname the#3\endcsname \@prfcountersep
609           \@prfcounter{#1}}%
610      \global\@namedef{#1}{\@prf{#1}{#2}}%
611      \global\@namedef{end#1}{\@endproof}}}
612 \def\@ynprf#1#2{%
613   \expandafter\@ifdefinable\csname #1\endcsname
614     {\@definecounter{#1}%
615      \expandafter\xdef\csname the#1\endcsname{\@prfcounter{#1}}%
616      \global\@namedef{#1}{\@prf{#1}{#2}}%
617      \global\@namedef{end#1}{\@endproof}}}
618 \def\@oprf#1[#2]#3{%
619   \@ifundefined{c@#2}{\@nocounterr{#2}}%
620     {\expandafter\@ifdefinable\csname #1\endcsname
621     {\global\@namedef{the#1}{\@nameuse{the#2}}%
622   \global\@namedef{#1}{\@prf{#2}{#3}}%
623   \global\@namedef{end#1}{\@endproof}}}}
624 \def\@prf#1#2{%
625   \refstepcounter{#1}%
626   \@ifnextchar[{\@yprf{#1}{#2}}{\@xprf{#1}{#2}}}
627 \def\@xprf#1#2{%
628   \@beginproof{#2}{\csname the#1\endcsname}\ignorespaces}
629 \def\@yprf#1#2[#3]{%
630   \@opargbeginproof{#2}{\csname the#1\endcsname}{#3}\ignorespaces}
631 \def\@prfcounter#1{\noexpand\arabic{#1}}
632 \def\@prfcountersep{.}
633 \def\@beginproof#1#2{\trivlist\let\baselinestretch\@blstr
634    \item[\hskip \labelsep{\scshape #1.}]\rmfamily}
635 \def\@opargbeginproof#1#2#3{\trivlist\let\baselinestretch\@blstr
636       \item[\hskip \labelsep{\scshape #1\ (#3).}]\rmfamily}
637 \def\@endproof{\endtrivlist}
638 \newcommand*{\qed}{\hbox{}\hfill$\Box$}
639
640 \@ifundefined{@biboptions}{\xdef\@biboptions{numbers}}{}
641 \InputIfFileExists{\jobname.spl}{}{}
642 \RequirePackage[\@biboptions]{natbib}
643
644 \newwrite\splwrite
645 \immediate\openout\splwrite=\jobname.spl
646 \def\biboptions#1{\def\next{#1}\immediate\write\splwrite{%
647    \string\g@addto@macro\string\@biboptions{%
648     ,\expandafter\strip@prefix\meaning\next}}}
649
650 \let\baselinestretch=\@blstr
651
652 \ifnum\jtype=1
653  \RequirePackage{geometry}
654  \geometry{twoside,
655   paperwidth=210mm,
656   paperheight=297mm,
657   textheight=562pt,
658   textwidth=384pt,
659   centering,
660   headheight=50pt,
661   headsep=12pt,
662   footskip=12pt,
663   footnotesep=24pt plus 2pt minus 12pt,
664  }
665  \global\let\bibfont=\footnotesize
666  \global\bibsep=0pt
667  \if@twocolumn\global\@twocolumnfalse\fi
668 \else\ifnum\jtype=3
669  \RequirePackage{geometry}
670  \geometry{twoside,
671   paperwidth=210mm,
672   paperheight=297mm,
673   textheight=622pt,
674   textwidth=468pt,
675   centering,
676   headheight=50pt,
677   headsep=12pt,
678   footskip=18pt,
679   footnotesep=24pt plus 2pt minus 12pt,
680   columnsep=2pc
681  }
682  \global\let\bibfont=\footnotesize
683  \global\bibsep=0pt
684  \if@twocolumn\input{fleqn.clo}\fi
685 \else\ifnum\jtype=5
686  \RequirePackage{geometry}
687  \geometry{twoside,
688   paperwidth=210mm,
689   paperheight=297mm,
690   textheight=682pt,
691   textwidth=522pt,
692   centering,
693  headheight=50pt,
694   headsep=12pt,
695   footskip=18pt,
696   footnotesep=24pt plus 2pt minus 12pt,
697   columnsep=18pt
698  }%
699  \global\let\bibfont=\footnotesize
700  \global\bibsep=0pt
701  \input{fleqn.clo}
702  \global\@twocolumntrue
703 %%
704 %% End of option '5p'
705 %%
706 \fi\fi\fi
707 \def\journal#1{\gdef\@journal{#1}}
708  \let\@journal\@empty
709 \newenvironment{frontmatter}{}{\maketitle}
710
711 \long\def\@makecaption#1#2{%
712   \vskip\abovecaptionskip\footnotesize
713   \sbox\@tempboxa{#1: #2}%
714   \ifdim \wd\@tempboxa >\hsize
715     #1: #2\par
716   \else
717     \global \@minipagefalse
718     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
719   \fi
720   \vskip\belowcaptionskip}
721
722 \AtBeginDocument{\@ifpackageloaded{hyperref}
723   {\def\@linkcolor{blue}
724    \def\@anchorcolor{blue}
725    \def\@citecolor{blue}
726    \def\@filecolor{blue}
727    \def\@urlcolor{blue}
728    \def\@menucolor{blue}
729    \def\@pagecolor{blue}
730 \begingroup
731   \@makeother\`%
732   \@makeother\=%
733   \edef\x{%
734     \edef\noexpand\x{%
735       \endgroup
736       \noexpand\toks@{%
737         \catcode 96=\noexpand\the\catcode`\noexpand\`\relax
738         \catcode 61=\noexpand\the\catcode`\noexpand\=\relax
739       }%
740     }%
741     \noexpand\x
742   }%
743 \x
744 \@makeother\`
745 \@makeother\=
746 }{}}
747 %%
748 \renewcommand\appendix{\par
749   \setcounter{section}{0}%
750   \setcounter{subsection}{0}%
751   \setcounter{equation}{0}
752   \gdef\thefigure{\@Alph\c@section.\arabic{figure}}%
753   \gdef\thetable{\@Alph\c@section.\arabic{table}}%
754   \gdef\thesection{\appendixname\@Alph\c@section}%
755   \@addtoreset{equation}{section}%
756   \gdef\theequation{\@Alph\c@section.\arabic{equation}}%
757 }
758 \def\appendixname{Appendix }
759
760 %% Added for work with amsrefs.sty
761
762 \@ifpackageloaded{amsrefs}%
763   {}
764   {\let\bibsection\relax%
765   \AtBeginDocument{\def\cites@b#1#2,#3{%
766     \begingroup[%
767         \toks@{\InnerCite{#2}#1}%
768         \ifx\@empty#3\@xp\@gobble\fi
769         \cites@c#3%
770 }}}
771 %%
772 \endinput
773 %%
774 %% End of file `elsarticle.cls'.