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