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

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